diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/GroupCommitPlanner.java b/fe/fe-core/src/main/java/org/apache/doris/planner/GroupCommitPlanner.java index 9b1044b2f7ef88..9fe9c2a0727fd9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/GroupCommitPlanner.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/GroupCommitPlanner.java @@ -62,7 +62,6 @@ import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; @@ -135,28 +134,7 @@ public PGroupCommitInsertResponse executeGroupCommitInsert(ConnectContext ctx, List rows) throws DdlException, RpcException, ExecutionException, InterruptedException { selectBackends(ctx); - if (backend == null || !backend.isAlive() || backend.isDecommissioned()) { - List allBackendIds = Env.getCurrentSystemInfo().getAllBackendIds(true); - if (allBackendIds.isEmpty()) { - throw new DdlException("No alive backend"); - } - Collections.shuffle(allBackendIds); - boolean find = false; - for (Long beId : allBackendIds) { - backend = Env.getCurrentSystemInfo().getBackend(beId); - if (!backend.isDecommissioned()) { - ctx.setInsertGroupCommit(this.table.getId(), backend); - find = true; - if (LOG.isDebugEnabled()) { - LOG.debug("choose new be {}", backend.getId()); - } - break; - } - } - if (!find) { - throw new DdlException("No suitable backend"); - } - } + PGroupCommitInsertRequest request = PGroupCommitInsertRequest.newBuilder() .setExecPlanFragmentRequest(InternalService.PExecPlanFragmentRequest.newBuilder() .setRequest(execPlanFragmentParamsBytes) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java index 51316630afff4b..e9ef33bd146a6f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java @@ -58,7 +58,6 @@ import org.apache.doris.service.arrowflight.results.FlightSqlChannel; import org.apache.doris.statistics.ColumnStatistic; import org.apache.doris.statistics.Histogram; -import org.apache.doris.system.Backend; import org.apache.doris.task.LoadTaskInfo; import org.apache.doris.thrift.TNetworkAddress; import org.apache.doris.thrift.TResultSinkType; @@ -225,7 +224,6 @@ public enum ConnectType { private Map resultAttachedInfo = Maps.newHashMap(); private String workloadGroupName = ""; - private Map insertGroupCommitTableToBeMap = new HashMap<>(); private boolean isGroupCommitStreamLoadSql; private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCAL; @@ -1139,14 +1137,6 @@ public String getWorkloadGroupName() { return this.workloadGroupName; } - public void setInsertGroupCommit(long tableId, Backend backend) { - insertGroupCommitTableToBeMap.put(tableId, backend); - } - - public Backend getInsertGroupCommit(long tableId) { - return insertGroupCommitTableToBeMap.get(tableId); - } - public boolean isSkipAuth() { return skipAuth; }