This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new ab04c2a8138 branch-3.1: [opt](cloud) optimize create warmup job logic
#57752 (#57865)
ab04c2a8138 is described below
commit ab04c2a81382bf2587262796a3ebeeaad5a4e7ba
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 11 19:11:28 2025 +0800
branch-3.1: [opt](cloud) optimize create warmup job logic #57752 (#57865)
Cherry-picked from #57752
Co-authored-by: Lijia Liu <[email protected]>
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]