Repository navigation
fix: flaky IngestionSmokeTest.test_runIndexTask_andKillData - #20962
maheshrijal wants to merge 2 commits into
Conversation
KubernetesClusterDockerTest runs two Brokers. The test waited for one Broker metadata sync event and then checked sys.segments once. The query can go to the other Broker, which may still list the unused segments. Poll sys.segments until it is empty instead. Fixes apache#20909.
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found in this review. The new polling checks the actual sys.segments result with the existing 60-second retry helper, addressing the two-Broker cache-sync/query race. The removed helper has no remaining callers.
Reviewed 1 of 1 changed files.
Validation: git diff --check passed; no build or tests were run.
This is an automated review by Codex GPT-5.6-Luna(max)
|
@maheshrijal , thanks for the fix. Wouldn't it be more appropriate to wait on the sync of both the Brokers and then proceed with the query? |
I went with this approach because I was referring to the |
Replace the sys.segments polling with a wait for the next segment/metadataCache/sync/time event from each Broker found through node discovery, matched by host, as suggested in review. Skip syncs that started before the wait, since the HTTP emitter can deliver them late.
|
@kfaraz can you re review please. |
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. The updated helper waits for a post-wait metadata sync from every discovered Broker and matches events by advertised host and port before checking sys.segments.
Reviewed 1 of 1 changed files.
Validation: git diff --check 088172524d52c8729efd331f1bcda252b271ac75..3010107e0ab252c3b6e2375ee06cc88da06bd64a passed; no build or tests were run.
This is an automated review by Codex GPT-5.6-Luna(max)
Fixes #20909.
Description
KubernetesClusterDockerTestruns two Brokers, and both emitsegment/metadataCache/sync/timeasdruid/broker.waitForNextBrokerCacheSync()returned on the first sync event from either Broker, but thesys.segmentsquery can go to the other Broker, which may not have polled the Coordinator yet.waitForNextBrokerCacheSync()now finds every Broker through node discovery and waits for a sync event from each one, matched by host. It skips syncs that started before the wait, because the HTTP emitter can deliver their events late.The issue says the in-JVM Broker uses the default 60 s poll period.
EmbeddedBrokersets it to 100 ms.Tested locally:
IngestionSmokeTest(6 of 6) and checkstyle pass. I did not runKubernetesClusterDockerTest.Release note
None. Test-only change.
Key changed/added classes in this PR
IngestionSmokeTestThis PR has:
Written with help from Opus 5.5 and Sol 6.2 Changes reviewed by me.