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


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java:
##########
@@ -1003,9 +1006,47 @@ public void checkDecommissionState(Map<String, 
List<Long>> clusterToBes) {
         }
     }
 
+    /**
+     * Decides whether this round sweeps stale routes, and advances the 
backend baseline. Call once per
+     * round. Without this gate the sweep would walk every replica's route 
maps once a second under
+     * table.readLock() only to find nothing, which on a large catalog is pure 
allocation.
+     */
+    @VisibleForTesting
+    boolean staleRouteSweepNeeded(Set<Long> currentBes) {
+        if (!Config.enable_cloud_replica_stale_route_clean) {
+            lastSweptBackends = null;
+            pendingSweepRounds = 0;
+            return false;
+        }
+        if (lastSweptBackends == null || 
!currentBes.containsAll(lastSweptBackends)) {
+            // Only a backend that went away can strand a route. Two rounds 
rather than one: a query

Review Comment:
   [P1] Cover the independent warmup publisher in the convergence boundary
   
   `warmupCheckScheduler` can finish the RPC and resolve destination B/group G 
at lines 910-916, then pause while sole-backend group G/B is fully dropped and 
both actual sweeps complete via an unrelated live group H. Group deletion does 
not cancel this inflight task. When the checker resumes, missing G falls back 
to the global warmup mode, so `handleWarmupCompletion()` writes G -> B at line 
1862 and journals it at line 927; with only H left, no later sweep or G 
callback is guaranteed to repair it. This is distinct from the earlier 
query-writer thread because that publisher is now post-validated. Please put 
the topology event, accepted map write, and edit-log batch in one 
generation-aware publication boundary, and add a barrier test covering this 
executor ordering and the persisted batch.



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