Skip to content

Commit 34ef86e

Browse files
authored
[fix](group commit) add some log to unstable insert_group_commit_with_prepare_stmt case (apache#48470)
1 parent d502f64 commit 34ef86e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

be/src/runtime/group_commit_mgr.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Status LoadBlockQueue::add_block(RuntimeState* runtime_state,
4646
return runtime_state->cancel_reason();
4747
}
4848
RETURN_IF_ERROR(status);
49+
LOG(INFO) << "query_id: " << print_id(runtime_state->query_id())
50+
<< ", add block rows=" << block->rows() << ", use group_commit label=" << label;
4951
if (block->rows() > 0) {
5052
if (!config::group_commit_wait_replay_wal_finish) {
5153
_block_queue.emplace_back(block);

fe/fe-core/src/main/java/org/apache/doris/planner/GroupCommitPlanner.java

+2
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ public PGroupCommitInsertResponse executeGroupCommitInsert(ConnectContext ctx,
159159
.setLoadId(Types.PUniqueId.newBuilder().setHi(loadId.hi).setLo(loadId.lo)
160160
.build()).addAllData(rows)
161161
.build();
162+
LOG.info("query_id={}, rows={}, reuse group commit query_id={} ", DebugUtil.printId(ctx.queryId()),
163+
rows.size(), DebugUtil.printId(loadId));
162164
Future<PGroupCommitInsertResponse> future = BackendServiceProxy.getInstance()
163165
.groupCommitInsert(new TNetworkAddress(backend.getHost(), backend.getBrpcPort()), request);
164166
return future.get();

regression-test/suites/insert_p0/insert_group_commit_with_prepare_stmt.groovy

+5
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ suite("insert_group_commit_with_prepare_stmt") {
132132
def url = getServerPrepareJdbcUrl(context.config.jdbcUrl, realDb, false)
133133
logger.info("url: " + url)
134134

135+
sql """ set global enable_prepared_stmt_audit_log = true """
136+
onFinish {
137+
sql """ set global enable_prepared_stmt_audit_log = false """
138+
}
139+
135140
def result1 = connect(user, password, url + "&sessionVariables=group_commit=async_mode") {
136141
try {
137142
// create table

0 commit comments

Comments
 (0)