Jackie-Jiang commented on code in PR #10118:
URL: https://github.com/apache/pinot/pull/10118#discussion_r1070190878


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/relocation/SegmentRelocator.java:
##########
@@ -91,10 +97,66 @@ public SegmentRelocator(PinotHelixResourceManager 
pinotHelixResourceManager,
         Math.min(taskIntervalInMs, 
config.getSegmentRelocatorExternalViewCheckIntervalInMs());
     _externalViewStabilizationTimeoutInMs =
         Math.min(taskIntervalInMs, 
config.getSegmentRelocatorExternalViewStabilizationTimeoutInMs());
+    if (config.isSegmentRelocatorRebalanceTablesSequentially()) {
+      _waitingTables = ConcurrentHashMap.newKeySet();
+      _waitingQueue = new LinkedBlockingQueue<>();
+      _executorService.submit(() -> {
+        LOGGER.info("Rebalance tables sequentially");
+        try {
+          // Keep checking any table waiting to rebalance.
+          while (true) {
+            rebalanceWaitingTable(this::rebalanceTable);
+          }
+        } catch (InterruptedException e) {
+          LOGGER.warn("Got interrupted while rebalancing tables sequentially", 
e);
+          Thread.currentThread().interrupt();

Review Comment:
   No need to interrupt this thread again. Remove this line and the thread will 
exit here
   ```suggestion
   ```



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