You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2026/09/12 00:01:14 UTC
[I] [Test] Flaky ScalableTopicControllerAutoScaleTest.testRebucketCooldownSurvivesLeaderFailover [pulsar]
lhotari opened a new issue, #26552:
URL: https://github.com/apache/pulsar/issues/26552
### Describe the bug
`ScalableTopicControllerAutoScaleTest.testRebucketCooldownSurvivesLeaderFailover` can assert before a coalesced auto-scale evaluation finishes.
Observed in [CI - Unit - Brokers - Broker Group 2](https://github.com/apache/pulsar/actions/runs/34657945446/job/103455924792), on commit `ba600bde951caa5697f7a8dce91b91586306bb5a`:
```text
java.lang.AssertionError: a hot-segment split must fire — the rollover is not a split expected [2] but found [1]
at ScalableTopicControllerAutoScaleTest.testRebucketCooldownSurvivesLeaderFailover(ScalableTopicControllerAutoScaleTest.java:507)
```
The downloaded test report contains two failing attempts. In both, the logs show the expected split dispatched on the scheduler with `trigger=coalesced`, followed by creation of the two successor segments.
### Timing issue
The test registers a consumer, reports hot-segment load, waits on `evaluateAutoScaleForTest().get()`, and immediately asserts the active segment count.
However, [evaluateAndAct](https://github.com/apache/pulsar/blob/ba600bde951caa5697f7a8dce91b91586306bb5a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/scalable/ScalableTopicController.java#L368-L404) returns an already-completed future when another evaluation is in flight. It marks a pending evaluation, which is later scheduled asynchronously. Consequently, waiting on the test helper does not necessarily wait for the requested evaluation or its split.
This explains the timing-dependent assertion: the test can observe one active segment before the scheduler completes the split. The controller and test are unchanged by the PR where this occurred.
### Suggested correction
Wait for the expected layout after triggering evaluation, or make the test helper await the coalesced evaluation. Preserve the assertions that rebucket cooldown survives failover and does not suppress a load-driven split.
### Environment
- GitHub Actions, Linux, Corretto JDK 25
- Gradle 9.7.1
- [Build scan](https://gradle.com/s/3g5nwuaw7mp3m)
Evidence is from CI logs, the test-report artifact, and source inspection; no local reproduction run yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Test] Flaky ScalableTopicControllerAutoScaleTest.testRebucketCooldownSurvivesLeaderFailover [pulsar]
Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece closed issue #26552: [Test] Flaky ScalableTopicControllerAutoScaleTest.testRebucketCooldownSurvivesLeaderFailover
URL: https://github.com/apache/pulsar/issues/26552
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org