Jackie-Jiang commented on code in PR #15681: URL: https://github.com/apache/pinot/pull/15681#discussion_r2069314466
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/relocation/SegmentRelocator.java: ########## @@ -120,17 +121,23 @@ public SegmentRelocator(PinotHelixResourceManager pinotHelixResourceManager, LOGGER.warn("Got interrupted while rebalancing tables sequentially", e); } }); + _tablesUndergoingRebalance = null; } else { _waitingTables = null; _waitingQueue = null; + _tablesUndergoingRebalance = ConcurrentHashMap.newKeySet(); } } @Override protected void processTable(String tableNameWithType) { if (_waitingTables == null) { - LOGGER.debug("Rebalance table: {} immediately", tableNameWithType); - _executorService.submit(() -> rebalanceTable(tableNameWithType)); + if (_tablesUndergoingRebalance == null || !_tablesUndergoingRebalance.contains(tableNameWithType)) { Review Comment: I usually use `assert _tablesUndergoingRebalance != null;` to suppress the warning. It also works as a note to developers that it cannot be `null` when reached -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org