FrankChen021 commented on code in PR #20320:
URL: https://github.com/apache/druid/pull/20320#discussion_r4053464370


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/compact/CompactionTestBase.java:
##########
@@ -97,8 +97,8 @@ protected List<Interval> getSegmentIntervals()
 
   protected void verifySegmentsCount(int numExpectedSegments)
   {
-    // Ensure that Broker has synced latest segments from the Coordinator
-    broker.latchableEmitter().waitForNextEvent(event -> 
event.hasMetricName("segment/metadataCache/sync/time"));
+    // The Overlord state is verified immediately; the Broker-side 
sys.segments view is polled
+    // until it matches, since a single metadata cache sync may still observe 
the previous state.
     cluster.callApi().verifyNumVisibleSegmentsIs(numExpectedSegments, 
dataSource, overlord);

Review Comment:
   Fixed in bf951bfbe7. `verifyNumVisibleSegmentsIs` now captures the current 
visible segment IDs from metadata and polls `sys.segments` for those exact IDs, 
so an unchanged count cannot accept the previous compaction's segments. Focused 
`services` test compilation passed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to