Skip to content

fix(meta): limit pending barriers in partial graphs - #26467

Merged
wenym1 merged 6 commits into
mainfrom
wenym1/limit-pending-barriers
Jul 29, 2026
Merged

wenym1 merged 6 commits into
mainfrom
wenym1/limit-pending-barriers

Conversation

@wenym1

@wenym1 wenym1 commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

The global barrier worker previously applied streaming.in_flight_barrier_nums only to barriers still in flight in the database partial graph. Collected but uncommitted barriers did not count toward the limit, and snapshot-backfill partial graphs were not bounded by their total pending count.

This PR:

  • applies in_flight_barrier_nums to the full database partial-graph pending count: in-flight, collected but not committed, and currently completing barriers;
  • bounds snapshot-backfill pending barriers by in_flight_barrier_nums * snapshot_backfill_barrier_amplification_factor;
  • changes the amplification factor's default to 1 and sets it to 10 in every CI configuration that explicitly sets in_flight_barrier_nums to 10, giving those CI snapshot-backfill graphs a pending limit of 100 while database graphs remain limited to 10;
  • retains explicit command and required lifecycle barriers as soft-limit exceptions;
  • queues snapshot and log-store catch-up barriers when the snapshot-backfill partial graph has no available capacity;
  • keeps the tombstone backfill regression test on arrangement backfill by explicitly disabling snapshot backfill for its MV creation session.

Release investigation found that #26423 was not cherry-picked into either release-2.8 or release-3.0. Both release branches still have the underlying inflight-only/unbounded-catch-up behavior, but neither has the amplification configuration. Backports of this PR therefore need to account for the missing configuration.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • I have checked the Release Timeline and Currently Supported Versions to determine which release branches I need to cherry-pick this PR into.

Documentation

  • My PR needs documentation updates.

The generated example configuration and configuration reference document the pending-barrier semantics of in_flight_barrier_nums and the new multiplier semantics and default of snapshot_backfill_barrier_amplification_factor.

Release note

Barrier injection now limits the total number of pending barriers per database partial graph, including barriers that have been collected but not yet committed. Snapshot-backfill partial graphs use the same base limit multiplied by streaming.snapshot_backfill_barrier_amplification_factor, which defaults to 1.

Tests

  • ./risedev generate-example-config
  • cargo test -p risingwave_meta pending_barrier --lib
  • cargo check -p risingwave_meta_node
  • cargo fmt --all
  • cargo clippy --all-targets --all-features
  • bash -n ci/scripts/run-backfill-tests.sh
  • git diff --check
  • ./risedev slt -p 4566 -d dev './e2e_test/streaming/bug_fixes/stack_overflow_17342.slt'
  • ./risedev slt -p 4566 -d dev './e2e_test/streaming/unaligned-join.slt'

The latest CI-configuration-only update was checked with git diff --check and an audit confirming that every ci*.toml with in_flight_barrier_nums = 10 also has snapshot_backfill_barrier_amplification_factor = 10. Per request, Clippy and local e2e tests were not rerun for that update.

wenym1 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added type/fix Type: Bug fix. Only for pull requests. ci/run-e2e-single-node-tests labels Jul 28, 2026
@wenym1 wenym1 added A-meta Area: Meta node. user-facing-changes Contains changes that are visible to users 📖✓ Covered or will be covered in the user docs. ci/run-backfill-tests ci/run-integration-test-deterministic-simulation need-cherry-pick-since-release-2.8 labels Jul 28, 2026
@hzxa21
hzxa21 self-requested a review July 29, 2026 03:30

@hzxa21 hzxa21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenym1
wenym1 added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit 55438cf Jul 29, 2026
40 of 41 checks passed
@wenym1
wenym1 deleted the wenym1/limit-pending-barriers branch July 29, 2026 11:18
@github-actions

Copy link
Copy Markdown
Contributor

❌ Cherry-pick failed for one or more branches. Please check the workflow run logs and consider retrying or manually cherry-picking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants