Skip to content

Commit

Permalink
[BugFix] Fix the issue of repeated migration of colocate tablets
Browse files Browse the repository at this point in the history
Signed-off-by: Jiao Mingye <mxdzs0612@gmail.com>
  • Loading branch information
mxdzs0612 committed Jan 21, 2025
1 parent d650aa8 commit 9ae9ada
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ private List<TabletSchedCtx> balanceClusterDisk(ClusterLoadStatistic clusterStat
continue;
}

if (!olapTable.needSchedule(false)) {
continue;
}

if (isDestBackendLocationMismatch(olapTable, hBackend.getId(), lBackend.getId(),
physicalPartition.getParentId(), tabletId)) {
continue;
Expand Down Expand Up @@ -984,6 +988,11 @@ private Map<Pair<Long, Long>, Set<Long>> getPartitionTablets(long beId, TStorage
}
}

OlapTable olapTable = getOlapTableById(tabletMeta.getDbId(), tabletMeta.getTableId());
if (olapTable != null && !olapTable.needSchedule(true)) {
continue;
}

Pair<Long, Long> key = new Pair<>(tabletMeta.getPhysicalPartitionId(), tabletMeta.getIndexId());
partitionTablets.computeIfAbsent(key, k -> Sets.newHashSet()).add(tabletId);
}
Expand Down

0 comments on commit 9ae9ada

Please sign in to comment.