github-actions[bot] commented on code in PR #68995:
URL: https://github.com/apache/doris/pull/68995#discussion_r4257418473


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java:
##########
@@ -1775,48 +1801,42 @@ private void handleWarmupCompletion(InfightTask task, 
String clusterId, boolean
         }
     }
 
-    private void updateBeToTablets(Long tabletId, Long srcBe, Long destBe,
-                                   ConcurrentHashMap<Long, Set<Long>> 
globalBeToTablets,
-                                   ConcurrentHashMap<Long, 
ConcurrentHashMap<Long, Set<Long>>> beToTabletsInTable,
-                                   ConcurrentHashMap<Long, 
ConcurrentHashMap<Long, ConcurrentHashMap<Long,
-                                       Set<Long>>>> partToTablets) {
+    private void updateBeToTablets(Long tabletId, Long srcBe, Long destBe, 
String clusterId,
+                                   RouteVariant variant, 
ConcurrentHashMap<Long, Set<Long>> globalBeToTablets) {
         TabletMeta tabletMeta = 
Env.getCurrentEnv().getTabletInvertedIndex().getTabletMeta(tabletId);
         if (tabletMeta == null) {
             LOG.warn("tablet {} meta not found in inverted index, skip 
updateBeToTablets", tabletId);
             return;
         }
         Long tableId = tabletMeta.getTableId();
-        Long partId = tabletMeta.getPartitionId();
-        Long indexId = tabletMeta.getIndexId();
-
         Set<Long> globalSrcTablets = globalBeToTablets.get(srcBe);
         if (globalSrcTablets == null || !globalSrcTablets.remove(tabletId)) {
-            LOG.debug("skip updateBeToTablets for tablet {}: srcBe {} not in 
globalBeToTablets", tabletId, srcBe);
-            return;
+            // A live view can be newer than the round-global route snapshot.
+            for (Long be : 
Preconditions.checkNotNull(clusterToBes.get(clusterId))) {

Review Comment:
   [P2] Skip obsolete rollbacks for a removed compute group
   
   When a compute group is dropped while it has inflight warmups, 
`CloudClusterChecker` removes all of its backends, so the next 
`buildClusterToBackendMap`/`statRouteInfo` omit that group. The independent 
warmup checker queues its tasks for cancellation, but draining each task 
reaches this fallback with no global source membership and 
`clusterToBes.get(clusterId) == null`. `checkNotNull` then throws after only 
that task has been removed, aborting the round before `performBalancing`. With 
N queued warmups, remaining compute groups lose N balance rounds, each 
repeating the full route/statistics scans. Treat cancellation for a group 
absent from the round map as obsolete cleanup, without restoring membership for 
its removed backends, and drain all such tasks in one round. Add a test that 
removes an entire group with multiple inflight tasks while another group 
remains live.



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