This is an automated email from the ASF dual-hosted git repository.

liulijia pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 36344b8c05d [opt](cloud) optimize the logic of creating warmup 
job(#57752) (#57896)
36344b8c05d is described below

commit 36344b8c05d5ad3bc950ff6e938048e1cac2d7b0
Author: Lijia Liu <[email protected]>
AuthorDate: Tue Nov 11 16:59:52 2025 +0800

    [opt](cloud) optimize the logic of creating warmup job(#57752) (#57896)
    
    Cherry-picked from #57752
    
    Co-authored-by: liulijia <[email protected]>
---
 .../main/java/org/apache/doris/cloud/CacheHotspotManager.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java
index ed51961151e..d849d11e843 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/CacheHotspotManager.java
@@ -722,6 +722,12 @@ public class CacheHotspotManager extends MasterDaemon {
         Long warmUpTotalFileCache = 0L;
         LOG.info("Start warm up job {}, cluster {}, total cache size: {}",
                 jobId, dstClusterName, totalFileCache);
+        List<Backend> backends = getBackendsFromCluster(dstClusterName);
+        LOG.info("Got {} backends for cluster {}", backends.size(), 
dstClusterName);
+        Map<Long, Set<Long>> beToTabletIds = new HashMap<>();
+        for (Backend backend : backends) {
+            beToTabletIds.put(backend.getId(), 
getTabletIdsFromBe(backend.getId()));
+        }
         for (Triple<String, String, String> tableTriple : tables) {
             if (warmUpTotalFileCache > totalFileCache) {
                 LOG.info("Warm up size {} exceeds total cache size {}, 
breaking loop",
@@ -732,8 +738,7 @@ public class CacheHotspotManager extends MasterDaemon {
             List<Partition> partitions = getPartitionsFromTriple(tableTriple);
             LOG.info("Got {} partitions for table {}.{}.{}", partitions.size(),
                     tableTriple.getLeft(), tableTriple.getMiddle(), 
tableTriple.getRight());
-            List<Backend> backends = getBackendsFromCluster(dstClusterName);
-            LOG.info("Got {} backends for cluster {}", backends.size(), 
dstClusterName);
+
             List<Partition> warmUpPartitions = new ArrayList<>();
             for (Partition partition : partitions) {
                 Long partitionSize = partition.getDataSize(true);
@@ -755,7 +760,7 @@ public class CacheHotspotManager extends MasterDaemon {
             LOG.info("Got {} tablets for table {}.{}.{}", tablets.size(),
                     tableTriple.getLeft(), tableTriple.getMiddle(), 
tableTriple.getRight());
             for (Backend backend : backends) {
-                Set<Long> beTabletIds = getTabletIdsFromBe(backend.getId());
+                Set<Long> beTabletIds = beToTabletIds.get(backend.getId());
                 List<Tablet> warmUpTablets = new ArrayList<>();
                 for (Tablet tablet : tablets) {
                     if (beTabletIds.contains(tablet.getId())) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to