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


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java:
##########
@@ -1224,11 +1237,11 @@ public void statRouteInfo() {
 
                     InfightTablet taskKey = new InfightTablet(tabletId, 
cluster);
                     InfightTask task = tabletToInfightTask.get(taskKey);
-                    long futureBeId = task == null ? beId : task.destBe;
-                    fillBeToTablets(beId, table.getId(), partition.getId(), 
index.getId(), tabletId,
+                    Long futureBeId = task == null ? beId : 
Long.valueOf(task.destBe);

Review Comment:
   [P2] Preserve inflight identity across route rebuilds
   
   This is distinct from the existing thread's immediate unbox/rebox path: it 
requires the asynchronous task to survive into a later daemon run. 
`statRouteInfo()` creates a fresh above-cache `Long` and installs it in both 
rebuilt map families, while `WarmupTabletTask` still holds the previous 
selected object. If the queued RPC failure is then consumed by `balanceImpl`, 
`revertWarmupState()` removes the rebuilt object only from the future sets and 
reinserts the stale task object; the current sets keep the fresh reference. The 
new rollback test reverts within one map generation, so it misses this 
ordering. Please reuse the inflight task's canonical `pickedTabletId` for both 
fills during rebuild (or recover the canonical current-map object during 
rollback), and cover preheat -> rebuild -> failure/revert.
   



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