From 98dd7aae1256cc382d648853ac787e54d36746fa Mon Sep 17 00:00:00 2001 From: deardeng Date: Fri, 21 Nov 2025 22:21:20 +0800 Subject: [PATCH] [fix](cloud) Fixed uneven tablet performance during upgrades from older versions (#58135) Prior to this https://github.com/apache/doris/pull/42986 PR, the `getLastUpdateMs` field of the backend was not written to the fe image. This caused the tablet mapping on the cloud to lose the PrimaryBackend information after the upgrade, resulting in the regeneration of an incorrect PrimaryBackend and uneven tablet distribution. detail: image --- .../org/apache/doris/cloud/catalog/CloudTabletRebalancer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 f6d1a58c9d3a37..5b34d299003474 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 @@ -651,7 +651,9 @@ private boolean completeRouteInfo() { // primary backend is alive or dead not long Backend be = replica.getPrimaryBackend(cluster, false); if (be != null && (be.isQueryAvailable() - || (!be.isQueryDisabled() && be.getLastUpdateMs() > needRehashDeadTime))) { + || (!be.isQueryDisabled() + // Compatible with older version upgrades, see https://github.com/apache/doris/pull/42986 + && (be.getLastUpdateMs() <= 0 || be.getLastUpdateMs() > needRehashDeadTime)))) { beIds.add(be.getId()); tabletIds.add(tablet.getId()); continue;