Skip to content

Commit

Permalink
[Enhancement] Disable DiskAndTabletLoadReBalancer in shared data mode (
Browse files Browse the repository at this point in the history
…#34794)

Does not run DiskAndTabletLoadReBalancer in shared data mode to reduce database lock contention.

Signed-off-by: Alex Zhu <zhuming9011@gmail.com>
  • Loading branch information
sduzh authored Nov 14, 2023
1 parent 24a6d0e commit 5390b04
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import com.starrocks.common.Config;
import com.starrocks.common.Pair;
import com.starrocks.server.GlobalStateMgr;
import com.starrocks.server.RunMode;
import com.starrocks.system.Backend;
import com.starrocks.thrift.TStorageMedium;
import org.apache.logging.log4j.LogManager;
Expand Down Expand Up @@ -78,6 +79,9 @@ public class DiskAndTabletLoadReBalancer extends Rebalancer {
@Override
protected List<TabletSchedCtx> selectAlternativeTabletsForCluster(
ClusterLoadStatistic clusterStat, TStorageMedium medium) {
if (!RunMode.getCurrentRunMode().isAllowCreateOlapTable()) {
return Collections.emptyList();
}
List<TabletSchedCtx> alternativeTablets;
String balanceType = "";
do {
Expand Down

0 comments on commit 5390b04

Please sign in to comment.