jtao15 commented on code in PR #8838:
URL: https://github.com/apache/pinot/pull/8838#discussion_r895990837
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -3183,6 +3186,20 @@ public String startReplaceSegments(String
tableNameWithType, List<String> segmen
return segmentLineageEntryId;
}
+ private void waitForSegmentsToDelete(String tableNameWithType, List<String>
segments, long timeOutInMillis)
+ throws InterruptedException {
+ LOGGER.info("Wait segments to delete. timeout = {}ms, segments = {}",
timeOutInMillis, segments);
+ long endTimeMs = System.currentTimeMillis() + timeOutInMillis;
+ do {
+ if (Collections.disjoint(getSegmentsFor(tableNameWithType, false),
segments)) {
+ return;
+ } else {
+ Thread.sleep(SEGMENT_CLEANUP_CHECK_INTERVAL_MS);
+ }
+ } while (System.currentTimeMillis() < endTimeMs);
+ throw new RuntimeException("Timeout while waiting for segments to be
deleted");
Review Comment:
logged the table name and timeout.
We are logging the exception on `L3178`, so we don't need any other details?
--
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]