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


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/LocalTabletInvertedIndex.java:
##########
@@ -924,12 +924,14 @@ public void setPartitionCollectInfoMap(ImmutableMap<Long, 
PartitionCollectInfo>
         this.partitionCollectInfoMap = partitionCollectInfoMap;
     }
 
-    // Only build from available bes, exclude colocate tables

Review Comment:
   [P2] Gate pending-move remapping by the tablet's storage medium. If an SSD 
move is cached and its destination loses SSD while remaining an available HDD 
backend, availableBeIds.contains(move.toBe) still passes here; the source is 
then inserted into the SSD partition count map, while the total SSD map omits 
that backend. The inconsistent extrema can make the planner schedule an SSD 
move to a backend with no SSD path, which fails in completeSchedCtx. Use the 
medium-specific availableBeIdsByMedium list (after reading the tablet medium), 
or invalidate/ignore the stale move.



##########
fe/fe-core/src/main/java/org/apache/doris/clone/LoadStatisticForTag.java:
##########
@@ -68,6 +68,8 @@ public class LoadStatisticForTag {
     private final Map<TStorageMedium, TreeMultimap<Long, Long>> 
beByTotalReplicaCountMaps = Maps.newHashMap();
     private Map<TStorageMedium, TreeMultimap<Long, 
TabletInvertedIndex.PartitionBalanceInfo>> skewMaps
             = Maps.newHashMap();
+    // Moves already accounted for in both replica-count maps of this snapshot.

Review Comment:
   [P2] Preserve or invalidate pending moves across location-tag changes. A 
move cached under tag A can survive clone completion while source deletion is 
pending; after both endpoints move to tag B, this snapshot reads only 
cacheMap.get(B), so B statistics count the move's endpoints as ordinary 
replicas and can select another move before the A cache is reconciled or 
removed. Rehome/invalidate the old entry only after the move is cancelled or 
keep it represented until completion.



##########
fe/fe-core/src/main/java/org/apache/doris/clone/LoadStatisticForTag.java:
##########
@@ -68,6 +68,8 @@ public class LoadStatisticForTag {
     private final Map<TStorageMedium, TreeMultimap<Long, Long>> 
beByTotalReplicaCountMaps = Maps.newHashMap();
     private Map<TStorageMedium, TreeMultimap<Long, 
TabletInvertedIndex.PartitionBalanceInfo>> skewMaps
             = Maps.newHashMap();
+    // Moves already accounted for in both replica-count maps of this snapshot.
+    private Map<Long, Pair<TabletMove, Long>> movesInProgress = 
Maps.newHashMap();

Review Comment:
   [P2] Only skip applyMove for moves actually represented in the snapshot. 
When neither endpoint is admitted by the replica scan (both cells are gone, or 
an endpoint is filtered as unavailable), this ID-only check still returns true, 
so buildClusterInfo retains the stale cache entry instead of invalidating it; 
the tablet stays in inProgressIds and TabletChecker can defer repair until the 
cache TTL. Track incorporated move identities during the scan (or verify an 
endpoint was admitted) and let an absent-endpoint move fail and be removed.



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