sollhui opened a new pull request, #70915:
URL: https://github.com/apache/doris/pull/70915

   ### Background
   
   Group Commit can combine several loads in a single transaction. A 
synchronous load waits for the shared transaction to finish. An asynchronous 
load also waits if the backend switches it to synchronous mode because the WAL 
directory has insufficient space.
   
   ### What problem does this PR solve?
   
   Issue Number: None  
   Related PR: None  
   PR Type: Bugfix
   
   Problem Summary: A waiting load could return success after a failed commit 
RPC or an unsuccessful commit response from the frontend. Record the error on 
the shared load queue before releasing the waiting loads.
   
   ### Details
   
   - **Frequency:** Affects a waiting load when fragment execution succeeds and 
the final commit attempt reports an error.
   - **Root cause:** The callback used the RPC and transaction outcomes to 
choose WAL recovery, but the waiting sink read a queue status that still 
indicated success.
   - **Why existing tests missed it:** The low-space test checked successful 
fallback. The WAL recovery tests exercised errors with asynchronous requests.
   - **Fix:** Set the queue status under its mutex before marking the queue 
finished. Preserve the first queue error and give a transport error precedence 
over the response payload.
   - **Other paths and branches:** A publish timeout still counts as a 
committed transaction. WAL deletion and recovery use the same success criteria 
as before.
   - **Behavior change:** A waiting client receives the commit error. A 
transport error can leave the actual transaction outcome unknown.
   
   ### Testing
   
   Extended `test_low_wal_disk_space_fault_injection` to assert the Stream Load 
response status and error message for an explicit synchronous request with an 
RPC error and a downgraded asynchronous request with an FE result error. The 
injected errors are applied after the commit call, so these assertions 
specifically test error propagation.
   
   The modified C++ file passed clang-format 16 validation. The regression 
script compiled with the Groovy compiler, and `git diff --check` passed. The 
local regression runner requires JDK 17. The BE build and end-to-end suite have 
not been verified locally.
   
   ### Release note
   
   Synchronous Group Commit loads, including asynchronous loads that switch to 
synchronous mode, now report transaction commit errors to the client.
   
   ### Check List (For Author)
   
   - Behavior changed: Yes (see Details)
   - Does this need documentation: No
   - Pre-submission status: Partially verified: BE build and end-to-end 
regression pending.
   
   ### AI Disclosure
   
   - Tool: OpenAI Codex (GPT-6)
   - Generated: Implementation, regression coverage, 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]

Reply via email to