Skip to content

Commit

Permalink
[fix](roup commit) remove unused code (#44015)
Browse files Browse the repository at this point in the history
  • Loading branch information
mymeiyi committed Nov 18, 2024
1 parent ea61206 commit c7f377b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -135,28 +134,7 @@ public PGroupCommitInsertResponse executeGroupCommitInsert(ConnectContext ctx,
List<InternalService.PDataRow> rows)
throws DdlException, RpcException, ExecutionException, InterruptedException {
selectBackends(ctx);
if (backend == null || !backend.isAlive() || backend.isDecommissioned()) {
List<Long> 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)
Expand Down
10 changes: 0 additions & 10 deletions fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -225,7 +224,6 @@ public enum ConnectType {
private Map<String, String> resultAttachedInfo = Maps.newHashMap();

private String workloadGroupName = "";
private Map<Long, Backend> insertGroupCommitTableToBeMap = new HashMap<>();
private boolean isGroupCommitStreamLoadSql;

private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCAL;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit c7f377b

Please sign in to comment.