-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement](Nereids) Nereids supports group_commit with insert #32523
[Enhancement](Nereids) Nereids supports group_commit with insert #32523
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
TPC-H: Total hot run time: 38135 ms
|
TPC-DS: Total hot run time: 180904 ms
|
TPC-H: Total hot run time: 37418 ms
|
TPC-DS: Total hot run time: 181604 ms
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
run buildall |
TPC-H: Total hot run time: 38484 ms
|
TPC-DS: Total hot run time: 186787 ms
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
run buildall |
TPC-H: Total hot run time: 38355 ms
|
TPC-DS: Total hot run time: 186015 ms
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
run buildall |
TPC-H: Total hot run time: 38428 ms
|
TPC-DS: Total hot run time: 185943 ms
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
TPC-H: Total hot run time: 37736 ms
|
TPC-DS: Total hot run time: 184702 ms
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
@Override | ||
protected void onFail(Throwable t) { | ||
errMsg = t.getMessage() == null ? "unknown reason" : t.getMessage(); | ||
StringBuilder sb = new StringBuilder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the sb is unused
@Override | ||
protected void beforeExec() { | ||
String queryId = DebugUtil.printId(ctx.queryId()); | ||
LOG.info("start insert [{}] with query id {} and txn id {}", labelName, queryId, txnId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the txnId is -1, no need to log it
try { | ||
handleGroupCommit(ctx, sink, olapSink, planner); | ||
} catch (TException | RpcException | ExecutionException | InterruptedException e) { | ||
LOG.error("errors when group commit insert. {}", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the {} is not unused
ctx.getState().setError(ErrorCode.ERR_UNKNOWN_ERROR, t.getMessage()); | ||
// set insert result in connection context, | ||
// so that user can use `show insert result` to get info of the last insert operation. | ||
ctx.setOrUpdateInsertResult(txnId, labelName, database.getFullName(), table.getName(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when execute error, should we set row num?
// TODO: in legacy, there is a retry, we need to implement | ||
if (code == TStatusCode.DATA_QUALITY_ERROR && !errorMsgsList.isEmpty() && errorMsgsList.get(0) | ||
.contains("schema version not match")) { | ||
LOG.info("group commit insert failed. query id: {}, backend id: {}, status: {}, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log here and return success to client, will cause the data lost?
@@ -80,7 +93,7 @@ suite("insert_group_commit_into_max_filter_ratio") { | |||
logger.warn("insert result: " + result + ", expected_row_count: " + expected_row_count + ", sql: " + sql) | |||
} | |||
// assertEquals(result, expected_row_count) | |||
assertTrue(serverInfo.contains("'status':'ABORTED'")) | |||
assertTrue(serverInfo.contains("too many filtered rows")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change it, we can both check status and error msg
run buildall |
TPC-H: Total hot run time: 41131 ms
|
TPC-DS: Total hot run time: 172654 ms
|
ClickBench: Total hot run time: 30.68 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
…atus (#35995) 1. Modify group commit p2 case to use nereids since #32523 support it. 2. We get many same logs when group commit is cancelled: ``` group_commit_mgr.cpp:182] cancel group commit, instance_id=xx, label=xx, status=[OK] ``` the problem is that `runtime_state->is_cancelled` is true, but `runtime_state->cancel_reason()` is `OK`
) ## Proposed changes Nereids supports group_commit with insert Co-authored-by: abmdocrt <[email protected]> Co-authored-by: meiyi <[email protected]>
…atus (#35995) 1. Modify group commit p2 case to use nereids since #32523 support it. 2. We get many same logs when group commit is cancelled: ``` group_commit_mgr.cpp:182] cancel group commit, instance_id=xx, label=xx, status=[OK] ``` the problem is that `runtime_state->is_cancelled` is true, but `runtime_state->cancel_reason()` is `OK`
…atus (apache#35995) 1. Modify group commit p2 case to use nereids since apache#32523 support it. 2. We get many same logs when group commit is cancelled: ``` group_commit_mgr.cpp:182] cancel group commit, instance_id=xx, label=xx, status=[OK] ``` the problem is that `runtime_state->is_cancelled` is true, but `runtime_state->cancel_reason()` is `OK`
Proposed changes
Nereids supports group_commit with insert
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...