pingchunzhang commented on code in PR #65153:
URL: https://github.com/apache/doris/pull/65153#discussion_r3511638030


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudInstanceStatusChecker.java:
##########
@@ -317,9 +326,15 @@ private void 
syncFileCacheTasksForVirtualGroup(Cloud.ClusterPB virtualGroupInMs,
                 // send jobIds to ms
                 List<String> newJobIds = 
Arrays.asList(Long.toString(jobIdPeriodic), Long.toString(jobIdEvent));
                 CloudSystemInfoService.updateFileCacheJobIds(virtualGroupInFe, 
newJobIds);
+                LOG.info("warmup-vcg rebuild-finish vcgName={} srcCluster={} 
dstCluster={} "
+                                + "createdPeriodicJobId={} 
createdEventJobId={} oldJobIds={}",
+                        virtualGroupInFe.getName(), srcCg, dstCg, 
jobIdPeriodic, jobIdEvent, jobIdsInMs);
                 LOG.info("virtual compute group {}, generate new jobIds 
periodic={}, event={}, and old jobIds {}",
                         virtualGroupInFe, jobIdPeriodic, jobIdEvent, 
jobIdsInMs);
             } catch (AnalysisException e) {
+                LOG.warn("warmup-vcg rebuild-failed vcgName={} srcCluster={} 
dstCluster={} oldJobIds={} "
+                                + "failureReason={}",
+                        virtualGroupInFe.getName(), srcCg, dstCg, jobIdsInMs, 
e.getMessage(), e);
                 LOG.warn("virtual compute err, name: {}, failed to generate 
file cache warm up jobs: {}",
                         virtualGroupInFe.getName(), e.getMessage(), e);

Review Comment:
   same



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudInstanceStatusChecker.java:
##########
@@ -317,9 +326,15 @@ private void 
syncFileCacheTasksForVirtualGroup(Cloud.ClusterPB virtualGroupInMs,
                 // send jobIds to ms
                 List<String> newJobIds = 
Arrays.asList(Long.toString(jobIdPeriodic), Long.toString(jobIdEvent));
                 CloudSystemInfoService.updateFileCacheJobIds(virtualGroupInFe, 
newJobIds);
+                LOG.info("warmup-vcg rebuild-finish vcgName={} srcCluster={} 
dstCluster={} "
+                                + "createdPeriodicJobId={} 
createdEventJobId={} oldJobIds={}",
+                        virtualGroupInFe.getName(), srcCg, dstCg, 
jobIdPeriodic, jobIdEvent, jobIdsInMs);
                 LOG.info("virtual compute group {}, generate new jobIds 
periodic={}, event={}, and old jobIds {}",
                         virtualGroupInFe, jobIdPeriodic, jobIdEvent, 
jobIdsInMs);

Review Comment:
   merge this two logs



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java:
##########
@@ -516,9 +544,16 @@ public boolean tryRegisterRunningJob(CloudWarmUpJob job) {
         // Try to register the job atomically if absent
         Long existingJobId = clusterToRunningJobId.putIfAbsent(clusterName, 
jobId);
         boolean success = (existingJobId == null) || (existingJobId == jobId);
-        if (!success) {
-            LOG.info("Job {} skipped: waiting for job {} to finish on 
destination cluster {}",
-                    jobId, existingJobId, clusterName);
+        if (success) {
+            LOG.info("warmup-lock register jobId={} srcCluster={} 
dstCluster={} syncMode={} jobType={} "
+                            + "existingJobId={} registerResult={}",
+                    jobId, job.getSrcClusterName(), clusterName, 
job.getSyncMode(), job.getJobType(),
+                    existingJobId, "success");
+        } else {
+            LOG.debug("warmup-lock register jobId={} srcCluster={} 
dstCluster={} syncMode={} jobType={} "

Review Comment:
   use info level



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java:
##########
@@ -419,6 +425,24 @@ public void 
cancelTableLevelLoadEventWarmUpJobsForVirtualComputeGroup(
         }
         computeGroupsInVcg.add(activeComputeGroup);
         computeGroupsInVcg.add(standbyComputeGroup);
+        List<Long> matchedJobIds = new ArrayList<>();
+
+        for (CloudWarmUpJob existingJob : runnableCloudWarmUpJobs.values()) {
+            if (existingJob.isDone() || 
!isTableLevelLoadEventWarmUpJob(existingJob)) {
+                continue;
+            }
+            if (!computeGroupsInVcg.contains(existingJob.getSrcClusterName())
+                    || 
!computeGroupsInVcg.contains(existingJob.getDstClusterName())) {
+                continue;
+            }
+            matchedJobIds.add(existingJob.getJobId());
+        }
+        if (!matchedJobIds.isEmpty()) {
+            LOG.info("warmup-vcg cancel-table-level vcgName={} 
activeComputeGroup={} standbyComputeGroup={} "
+                            + "subComputeGroups={} matchedJobIds={} 
cancelReason={}",
+                    virtualComputeGroupName, activeComputeGroup, 
standbyComputeGroup,
+                    subComputeGroups, matchedJobIds, cancelReason);
+        }

Review Comment:
   remove this codes



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java:
##########
@@ -539,19 +574,32 @@ public boolean tryRegisterRunningJob(CloudWarmUpJob job) {
     private boolean deregisterRunningJob(CloudWarmUpJob job) {
         if (job.isEventDriven()) {
             // Event-driven jobs are not registered, so nothing to deregister
+            LOG.info("warmup-lock deregister-skip jobId={} srcCluster={} 
dstCluster={} syncMode={} jobType={} "

Review Comment:
   debug 



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java:
##########
@@ -516,9 +544,16 @@ public boolean tryRegisterRunningJob(CloudWarmUpJob job) {
         // Try to register the job atomically if absent
         Long existingJobId = clusterToRunningJobId.putIfAbsent(clusterName, 
jobId);
         boolean success = (existingJobId == null) || (existingJobId == jobId);
-        if (!success) {
-            LOG.info("Job {} skipped: waiting for job {} to finish on 
destination cluster {}",
-                    jobId, existingJobId, clusterName);
+        if (success) {
+            LOG.info("warmup-lock register jobId={} srcCluster={} 
dstCluster={} syncMode={} jobType={} "

Review Comment:
   use debug level



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java:
##########
@@ -1455,6 +1503,21 @@ public void cancel(long jobId, String msg) throws 
DdlException {
     }
 
     public void cancelTableFilterJobsForClusterChange(String clusterName, 
String reason) {
+        List<Long> affectedJobIds = new ArrayList<>();
+        for (CloudWarmUpJob job : runnableCloudWarmUpJobs.values()) {
+            if (job.isDone() || !job.hasTableFilter()) {
+                continue;
+            }
+            if (!Objects.equals(clusterName, job.getSrcClusterName())
+                    && !Objects.equals(clusterName, job.getDstClusterName())) {
+                continue;
+            }
+            affectedJobIds.add(job.getJobId());
+        }
+        if (!affectedJobIds.isEmpty()) {
+            LOG.info("warmup-system-cancel triggerType=CLUSTER_CHANGE 
clusterName={} affectedJobIds={} reason={}",
+                    clusterName, affectedJobIds, reason);
+        }

Review Comment:
   useless code. remove



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java:
##########
@@ -507,6 +531,10 @@ private static String 
formatExistingTableFilter(CloudWarmUpJob job) {
     public boolean tryRegisterRunningJob(CloudWarmUpJob job) {
         if (job.isEventDriven()) {
             // Event-driven jobs do not require registration, always allow
+            LOG.info("warmup-lock register-skip jobId={} srcCluster={} 
dstCluster={} syncMode={} jobType={} "

Review Comment:
   use debug level



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