Uh oh!
There was an error while loading. Please reload this page.
[fix](group commit) fix can not get a block queue - #63722
Conversation
hello-stephen
commented
May 27, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This PR addresses failures in group-commit stream load where the BE could not obtain a usable LoadBlockQueue under concurrency, by improving error handling around FE RPCs and adding resubmission/timeout logic for creating group-commit plan fragments. It also adds a new high-concurrency regression test intended to reproduce/guard the issue.
Changes:
- Improve RPC-status handling when aborting/committing group-commit transactions (avoid masking transport errors as FE result statuses).
- Add a background “create plan” worker + resubmission/timeout mechanism to reduce “can not get a block queue” occurrences during plan creation.
- Add a high-concurrency async group-commit stream load regression test.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| regression-test/suites/load_p0/stream_load/test_group_commit_stream_load_high_concurrency_async.groovy | New regression test stressing async group-commit under high concurrency. |
| be/src/load/group_commit/wal/wal_table.cpp | Return/LOG transport (RPC) errors distinctly from FE rollback result status. |
| be/src/load/group_commit/group_commit_mgr.h | Add new create-plan worker plumbing and make _need_commit atomic. |
| be/src/load/group_commit/group_commit_mgr.cpp | Implement create-plan resubmission worker, timeout handling, and improved commit/rollback RPC error handling. |
| be/src/common/config.h | Declare new config group_commit_create_plan_timeout_ms. |
| be/src/common/config.cpp | Define default for group_commit_create_plan_timeout_ms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mymeiyi
commented
May 27, 2026
/review |
There was a problem hiding this comment.
I found one blocking issue in the new group-commit plan creation worker. The new background thread does not initialize Doris thread context before executing BE code, which violates the BE runtime memory-tracking convention. Existing Copilot comments already covered the timeout comment mismatch, the add-load-id error message, and the p0 test size concern, so I did not duplicate those.
Checklist conclusions:
- Goal/test: The PR targets high-concurrency async group commit plan creation and adds a regression case, but the new worker thread setup is incomplete.
- Scope: The implementation is focused on group commit queue creation/retry, though it introduces a new manager thread.
- Concurrency: The new worker/condition-variable path is relevant; lock ordering looks consistent, but the worker thread lacks required thread-context initialization.
- Lifecycle:
GroupCommitMgr::stop()joins the new worker before shutting down the pool; no additional lifecycle blocker found. - Config: Adds a mutable timeout config with default/comment now aligned.
- Compatibility: No protocol/storage-format incompatibility found.
- Parallel paths: WAL rollback RPC handling was updated consistently in the touched paths.
- Tests: A stress regression test was added; existing review already noted the p0 size/flakiness risk.
- Observability: Existing logs are mostly sufficient for retries/failures.
- Transaction/persistence/data correctness: No additional transaction visibility or WAL recovery issue found in the changed logic.
- Performance: No additional performance blocker beyond the existing high-concurrency p0 test concern.
- User focus: No additional user-provided review focus was specified.
Uh oh!
There was an error while loading. Please reload this page.
47e1354 to
250bbcbComparemymeiyi
commented
May 27, 2026
run buildall |
hello-stephen
commented
May 27, 2026
TPC-H: Total hot run time: 31323 ms |
hello-stephen
commented
May 27, 2026
TPC-DS: Total hot run time: 172487 ms |
hello-stephen
commented
May 27, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
May 27, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
5c6c86a to
3e7b817Comparemymeiyi
commented
May 28, 2026
run buildall |
hello-stephen
commented
May 28, 2026
TPC-H: Total hot run time: 31954 ms |
hello-stephen
commented
May 28, 2026
TPC-DS: Total hot run time: 172648 ms |
hello-stephen
commented
May 28, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
May 28, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
3e7b817 to
0afd596Comparemymeiyi
commented
Jun 4, 2026
run buildall |
hello-stephen
commented
Jun 4, 2026
TPC-H: Total hot run time: 29365 ms |
hello-stephen
commented
Jun 4, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
mymeiyi
commented
Jun 29, 2026
run cloud_p0 |
hello-stephen
commented
Jun 29, 2026
TPC-H: Total hot run time: 29370 ms |
hello-stephen
commented
Jun 29, 2026
TPC-DS: Total hot run time: 170933 ms |
hello-stephen
commented
Jun 29, 2026
ClickBench: Total hot run time: 25.3 s |
mymeiyi
commented
Jun 29, 2026
/review |
There was a problem hiding this comment.
I found two issues that should be fixed before this lands.
Critical checkpoint conclusions: the PR's goal of reducing group-commit create-plan blocking is only partially met because the new timeout is skipped while a create-plan task is already queued or running. The new mutable config is added, but its runtime enforcement has a gap. The changed group-commit sink filtering/block handoff and WAL rollback status path looked consistent after review. Test coverage was added, but the new p0 stream-load test mutates persistent global root user state from a normal concurrent suite. I did not run the full Doris build or regression suite in this review runner.
Subagent conclusions: TSC-1 became MAIN-1 and is submitted as an inline test-isolation comment. TSC-2 became MAIN-2 and is submitted as an inline timeout-enforcement comment. OPT-1 was dismissed with code evidence because the empty add_rows path preserves the all-filtered 0-row behavior and checked column implementations treat empty ranges as no-ops. Convergence round 3 ended with both live subagents reporting NO_NEW_VALUABLE_FINDINGS for this final two-comment set.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mymeiyi
commented
Jun 29, 2026
run cloud_p0 |
mymeiyi
commented
Jun 29, 2026
run buildall |
hello-stephen
commented
Jun 29, 2026
TPC-H: Total hot run time: 29462 ms |
hello-stephen
commented
Jun 29, 2026
TPC-DS: Total hot run time: 172557 ms |
hello-stephen
commented
Jun 29, 2026
ClickBench: Total hot run time: 25.22 s |
hello-stephen
commented
Jun 29, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
hello-stephen
commented
Jun 29, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jun 29, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
PR approved by at least one committer and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
Under high-concurrency async stream load, group commit may fail to get a block queue when creating the group commit plan fragment fails or leaves pending load requests waiting for a queue that is no longer usable. This change tracks pending create-plan requests per table, adds a background worker to resubmit group commit plan creation, and introduces group_commit_create_plan_timeout_ms so waiting requests can be released after a bounded time.
### What problem does this PR solve? Issue Number: None Related PR: apache#63722 Problem Summary: Group Commit cancellation reconstructed BlockData from the current Block and could subtract a changed byte size from the shared queue memory counter, causing size_t underflow and persistent backpressure. ### Release note Fix Group Commit requests becoming blocked after a canceled load corrupts queue memory accounting. ### Check List (For Author) - Test: Unit Test added; not run per request. Static checks passed. - Behavior changed: No. Corrects queue memory accounting during cancellation. - Does this need documentation: No
Problem Summary:
Under high-concurrency async stream load, group commit may fail to get a block queue when creating the group commit plan fragment fails or leaves pending load requests waiting for a queue that is no longer usable. This change tracks pending create-plan requests per table, adds a background worker to resubmit group commit plan creation, and introduces group_commit_create_plan_timeout_ms so waiting requests can be released after a bounded time.