J-HowHuang commented on code in PR #19053:
URL: https://github.com/apache/pinot/pull/19053#discussion_r3677692921


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -1248,6 +1248,10 @@ public SegmentDataManager registerSegment(String 
segmentName, SegmentDataManager
       oldSegmentDataManager = _segmentDataManagerMap.put(segmentName, 
segmentDataManager);
     }
     _recentlyDeletedSegments.invalidate(segmentName);
+    // Fire the post-registration lifecycle hook now that the segment is 
swapped into the serving set
+    for (IndexSegment segment : segmentDataManager.getReportableSegments()) {
+      segment.onSegmentAdded();
+    }

Review Comment:
   Added this into SPI javadoc for `onSegmentAdded`
   ```
   Implementations must also return promptly. This runs inline on the segment 
registration thread, which is the
   Helix state-transition thread for the ONLINE transition, so a blocking or 
unbounded call here stalls the state
   transition itself; the caller applies no timeout. Any unbounded work (in 
particular remote I/O) must be bounded
   by the implementation or performed asynchronously by it
     ```



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