Skip to content

Commit 636657a

Browse files
authored
[fix](cloud) Fixed uneven tablet performance during upgrades from older versions (#58135)
Prior to this #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: <img width="930" height="859" alt="image" src="https://github.com/user-attachments/assets/23d62adc-0bbb-49cb-b5b0-d1768f6422c7" />
1 parent 7d0cae4 commit 636657a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ private boolean completeRouteInfo() {
651651
// primary backend is alive or dead not long
652652
Backend be = replica.getPrimaryBackend(cluster, false);
653653
if (be != null && (be.isQueryAvailable()
654-
|| (!be.isQueryDisabled() && be.getLastUpdateMs() > needRehashDeadTime))) {
654+
|| (!be.isQueryDisabled()
655+
// Compatible with older version upgrades, see https://github.com/apache/doris/pull/42986
656+
&& (be.getLastUpdateMs() <= 0 || be.getLastUpdateMs() > needRehashDeadTime)))) {
655657
beIds.add(be.getId());
656658
tabletIds.add(tablet.getId());
657659
continue;

0 commit comments

Comments
 (0)