[improve](group commit) Group commit support commit by data size (#29428)

This commit is contained in:
meiyi
2024-01-02 23:20:23 +08:00
committed by GitHub
parent d54cde51ba
commit 69524ccf98
5 changed files with 66 additions and 44 deletions

View File

@ -69,7 +69,6 @@ import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.protobuf.ByteString;
import org.apache.commons.collections.CollectionUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -150,7 +149,6 @@ public class NativeInsertStmt extends InsertStmt {
private boolean isGroupCommit = false;
private int baseSchemaVersion = -1;
private TUniqueId loadId = null;
private ByteString execPlanFragmentParamsBytes = null;
private long tableId = -1;
public boolean isGroupCommitStreamLoadSql = false;
private GroupCommitPlanner groupCommitPlanner;

View File

@ -1983,6 +1983,8 @@ public class FrontendServiceImpl implements FrontendService.Iface {
result.setTableId(parsedStmt.getTargetTable().getId());
result.setBaseSchemaVersion(((OlapTable) parsedStmt.getTargetTable()).getBaseSchemaVersion());
result.setGroupCommitIntervalMs(((OlapTable) parsedStmt.getTargetTable()).getGroupCommitIntervalMs());
// TODO get from table property
result.setGroupCommitDataBytes(134217728L);
result.setWaitInternalGroupCommitFinish(Config.wait_internal_group_commit_finish);
} catch (UserException e) {
LOG.warn("exec sql error", e);