Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yujun777 committed Sep 12, 2024
1 parent c0bb86f commit 0e2c2ae
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,8 @@ private void balanceImpl(List<Long> bes, String clusterId, Map<Long, List<Tablet
Tablet pickedTablet = beToTablets.get(srcBe).get(randomIndex);
CloudReplica cloudReplica = (CloudReplica) pickedTablet.getReplicas().get(0);

if (Config.enable_cloud_warm_up_for_rebalance) {
// if srcBe is dead, destBe cann't download cache from it.
if (Config.enable_cloud_warm_up_for_rebalance && srcBe.isAlive()) {
if (isConflict(srcBe, destBe, cloudReplica, balanceType, futurePartitionToTablets,
futureBeToTabletsInTable)) {
continue;
Expand All @@ -904,7 +905,7 @@ private void balanceImpl(List<Long> bes, String clusterId, Map<Long, List<Tablet
try {
sendPreHeatingRpc(pickedTablet, srcBe, destBe);
} catch (Exception e) {
break;
continue;
}

InfightTask task = new InfightTask();
Expand Down Expand Up @@ -963,9 +964,6 @@ private void migrateTablets(Long srcBe, Long dstBe) {
LOG.info("src backend {} not found", srcBe);
continue;
}
String clusterId = be.getCloudClusterId();
String clusterName = be.getCloudClusterName();

// populate to followers
Database db = Env.getCurrentInternalCatalog().getDbNullable(cloudReplica.getDbId());
if (db == null) {
Expand All @@ -978,6 +976,9 @@ private void migrateTablets(Long srcBe, Long dstBe) {
continue;
}

String clusterId = be.getCloudClusterId();
String clusterName = be.getCloudClusterName();

table.readLock();
try {
if (db.getTableNullable(cloudReplica.getTableId()) == null) {
Expand Down

0 comments on commit 0e2c2ae

Please sign in to comment.