sollhui opened a new pull request, #70743: URL: https://github.com/apache/doris/pull/70743
### Background Group Commit batches writes to a table on a selected BE. A follower FE can plan an INSERT locally and ask the master for the BE ID. During schema change the master temporarily blocks new Group Commit loads while it waits for outstanding WALs to drain. ### What problem does this PR solve? Issue Number: None Related PR: #35558 (master-side BE selection), #38201 (INSERT schema-change check) PR Type: Bugfix Problem Summary: A follower can admit a Group Commit INSERT while the master has already blocked the table. Its local block check can pass, and the master could return a cached or newly selected BE ID. The master now checks its own block before selecting a BE. ### Details - **Frequency:** Requires a Group Commit INSERT to reach backend selection during the table's schema-change block. - **Root cause:** The block lives in the FE running the DDL. Backend selection on the master previously did not consult it on behalf of a follower. - **Why existing tests missed it:** Backend-selection tests exercised cached BE reuse and selection failures without blocking the table between requests. - **Fix:** Check the block before either the cloud or local backend-selection path, including cache hits. Use a concurrent set so RPC threads can safely read changes made by the DDL thread. - **Other paths and branches:** Ordinary and prepared Group Commit INSERTs share this lookup. The existing RPC error path carries the rejection to the follower. This check covers requests reaching selection while blocked; a request admitted before the block can still be in flight. - **Behavior change:** A blocked table returns the existing schema-change error instead of a BE ID. Selection resumes when the table is unblocked. ### Testing Ran targeted JUnit tests locally against the compiled changed sources and cached FE dependencies. The new test first warms the backend cache, then checks rejection while blocked and successful selection after unblock. Against the unmodified master implementation it fails because no exception is thrown. With the fix all 7 tests in GroupCommitManagerBackendSelectionTest passed. Also ran the 12 existing tests in FrontendServiceImplBackendSelectionTest and MasterOpExecutorBackendSelectionTest covering the forwarding and error-handling paths. A full FE build and a multi-FE cluster run were not performed. ### Release note Group Commit INSERTs planned on a follower are rejected while the master has blocked the target table for schema change. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: targeted unit tests passed; multi-FE end-to-end coverage remains for CI. ### AI Disclosure - Tool: OpenAI Codex (GPT-6.2 Astra) - Generated: Implementation, regression test, and PR description. - Human review: Pending. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
