deardeng commented on code in PR #67913:
URL: https://github.com/apache/doris/pull/67913#discussion_r4005057222


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudClusterChecker.java:
##########
@@ -146,19 +147,22 @@ private void checkToDelCluster(Map<String, ClusterPB> 
remoteClusterIdToPB, Set<S
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("begin to drop clusterId: {}", delId);
                 }
-                String delClusterName = 
cloudSystemInfoService.getClusterNameByClusterId(delId);
-                if (delClusterName.isEmpty()) {
-                    return;
-                }
-                ((CloudEnv) 
Env.getCurrentEnv()).getCacheHotspotMgr().cancelTableFilterJobsForClusterChange(
-                        delClusterName, "system cancel: compute group " + 
delClusterName + " dropped");
                 List<Backend> toDel =
                         new 
ArrayList<>(finalClusterIdToBackend.getOrDefault(delId, new ArrayList<>()));
+                // The name index may already belong to a same-name 
replacement. Use the
+                // obsolete group's own BE tags, and never skip ID cleanup for 
a missing name.
+                String delClusterName = 
toDel.stream().map(Backend::getCloudClusterName).findFirst()
+                        .orElseGet(() -> 
cloudSystemInfoService.getClusterNameByClusterId(delId));
+                // Name-scoped jobs may already belong to the replacement 
group.
+                if 
(delId.equals(cloudSystemInfoService.getCloudClusterIdByName(delClusterName))) {

Review Comment:
   Compute groups are distinguished by ID, but warm-up jobs currently store 
only group names. When a name is reused by a new group, the name alone cannot 
tell whether a job belongs to the old or new group, so adjusting the guard 
cannot address both cases.



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