This is an automated email from the ASF dual-hosted git repository.
deardeng pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 4f48c57adac [improvement](fe) Release cloud tablet scheduling indexes
after balance (#66451) (#67290)
4f48c57adac is described below
commit 4f48c57adac764332c04d33c39584daa055c8034
Author: deardeng <[email protected]>
AuthorDate: Wed Sep 9 10:24:07 2026 +0800
[improvement](fe) Release cloud tablet scheduling indexes after balance
(#66451) (#67290)
pick from https://github.com/apache/doris/pull/66451
Release scheduling indexes after each balancing round and on migration
failures.
(cherry picked from commit b0d6429032dacd9b6fa23e5643ea591c14bae87c)
---
.../doris/cloud/catalog/CloudTabletRebalancer.java | 25 ++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
index 2aed435acad..3519b579b53 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
@@ -545,14 +545,18 @@ public class CloudTabletRebalancer extends MasterDaemon {
return;
}
- statRouteInfo();
- migrateTabletsForSmoothUpgrade();
- statRouteInfo();
+ try {
+ statRouteInfo();
+ migrateTabletsForSmoothUpgrade();
+ statRouteInfo();
- indexBalanced = true;
- tableBalanced = true;
+ indexBalanced = true;
+ tableBalanced = true;
- performBalancing();
+ performBalancing();
+ } finally {
+ releaseSchedulingIndexes();
+ }
checkDecommissionState(clusterToBes);
inited = true;
@@ -671,6 +675,15 @@ public class CloudTabletRebalancer extends MasterDaemon {
}
}
+ private void releaseSchedulingIndexes() {
+ // These indexes are no longer used after balancing. Replace their
top-level maps instead of clearing
+ // every entry so the complete tablet membership graphs can become
collectible without an O(N) traversal.
+ partitionToTablets = new ConcurrentHashMap<>();
+ futurePartitionToTablets = new ConcurrentHashMap<>();
+ beToTabletsInTable = new ConcurrentHashMap<>();
+ futureBeToTabletsInTable = new ConcurrentHashMap<>();
+ }
+
private boolean balanceAllPartitionsByPhase(ActiveSchedulePhase phase) {
// Reuse existing "balanced" flags as a per-phase signal.
indexBalanced = true;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]