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

   1. When several inserts reuse one server-side prepared group commit plan, 
they share a single load_id X (query_id/load_id/fragment_instance_id are baked 
into the reused serialized plan). 
   2. The BE uses X as the per-queue registration key in 
LoadBlockQueue::_load_ids_to_write_dep, and remove_load_id(X) is issued from 
two sites: wind_up() (synchronous, before the RPC returns and correctly ordered 
by FE serialization) and ~GroupCommitBlockSinkLocalState (async fragment 
teardown, after the RPC has returned). 
   3. FE serialization does not order one load's async teardown remove(X) 
against the next load's add_load_id(X), so the teardown can erase the next 
load's in-flight registration; the consumer then sees no writer in flight, 
commits the queue early, and the next load's add_block lands on the 
already-committed queue and is silently lost while FE reports success.
   
   Fix: track whether wind_up() already removed the load_id (_load_id_removed) 
and suppress the redundant remove in the destructor on the normal path, keeping 
it only as a fallback for abnormal (cancel/error) paths where wind_up did not 
run.


-- 
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