xiangfu0 commented on code in PR #17042:
URL: https://github.com/apache/pinot/pull/17042#discussion_r2446272777


##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/util/SegmentDeletionManagerTest.java:
##########
@@ -629,26 +629,34 @@ public boolean mkdir(URI uri)
         throws IOException {
       // create a new table Dir if the path ends with /
       if (uri.getPath().endsWith("/")) {
-        _tableDirs.put(uri.getPath(), new HashSet<>());
+        synchronized (_tableDirs) {

Review Comment:
   SegmentDeletionManager uses a single-threaded ScheduledExecutorService for 
async deletion. In the test we call removeAgedDeletedSegments(), which submits 
deletion work to that executor while the test thread concurrently calls 
PinotFS.exists()/listFiles(). FakePinotFs synchronizes access to _tableDirs to 
avoid races/CMEs and ensure visibility between the executor thread and the test 
thread.



-- 
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