Skip to content

[fix][test] Fix flaky ExtensibleLoadManagerImplTest.testLoadBalancerServiceUnitTableViewSyncer - #25596

Merged
merlimat merged 1 commit into
apache:masterfrom
merlimat:fix/flaky-testLoadBalancerServiceUnitTableViewSyncer
Apr 28, 2026
Merged

[fix][test] Fix flaky ExtensibleLoadManagerImplTest.testLoadBalancerServiceUnitTableViewSyncer#25596
merlimat merged 1 commit into
apache:masterfrom
merlimat:fix/flaky-testLoadBalancerServiceUnitTableViewSyncer

Conversation

@merlimat

Copy link
Copy Markdown
Contributor

Motivation

testLoadBalancerServiceUnitTableViewSyncer is flaky with expected [true] but found [false] after the 30s wait for primaryLoadManager.getServiceUnitStateTableViewSyncer().isActive().

The loadManagerExecutor is a single-threaded scheduled executor. After makeSecondaryAsLeader() followed immediately by makePrimaryAsLeader(), the new leader's playLeader() is queued behind any still-running playFollower() from the prior demotion. syncer.start() itself opens both table views and runs syncExistingItems + syncTailItems. Under CI load this serial chain can exceed 30s.

Modifications

Increase the timeout from 30s to 60s for the syncer-state checks after both leader transitions, and apply the same to the symmetric pair in the cleanup section after the dynamic config is removed.

Verifying this change

  • Make sure that the change passes the CI checks.

Locally verified with 3 successful back-to-back runs of the test.

…erviceUnitTableViewSyncer

playLeader() and playFollower() run on a single-threaded
loadManagerExecutor, so playLeader() on the new leader can be queued
behind a still-running playFollower() from the prior demotion. The
syncer.start() work itself opens both table views and runs
syncExistingItems/syncTailItems. Under CI load this serial chain can
exceed the previous 30s timeout.

Increase the timeout to 60s for both syncer-state checks (active on
new leader, inactive on demoted follower) and the symmetric pair in
the cleanup section after the dynamic config is removed.

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@merlimat
merlimat merged commit d69c787 into apache:master Apr 28, 2026
80 of 82 checks passed
@merlimat
merlimat deleted the fix/flaky-testLoadBalancerServiceUnitTableViewSyncer branch April 28, 2026 17:52
poorbarcode pushed a commit to poorbarcode/pulsar that referenced this pull request May 6, 2026
@lhotari lhotari added this to the 5.0.0-M1 milestone May 13, 2026
lhotari pushed a commit that referenced this pull request May 13, 2026
…erviceUnitTableViewSyncer (#25596)

(cherry picked from commit d69c787)
lhotari pushed a commit that referenced this pull request May 13, 2026
…erviceUnitTableViewSyncer (#25596)

(cherry picked from commit d69c787)
nodece pushed a commit to ascentstream/pulsar that referenced this pull request May 27, 2026
priyanshu-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 9, 2026
…erviceUnitTableViewSyncer (apache#25596)

(cherry picked from commit d69c787)
(cherry picked from commit b72fe75)
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