github-actions[bot] commented on code in PR #67759:
URL: https://github.com/apache/doris/pull/67759#discussion_r3975627241


##########
be/src/load/delta_writer/delta_writer.cpp:
##########
@@ -97,8 +97,14 @@ BaseDeltaWriter::~BaseDeltaWriter() {
         return;
     }
 
-    // cancel and wait all memtables in flush queue to be finished
+    // Stop flush producers before releasing their rowset builders.
     static_cast<void>(_memtable_writer->cancel());
+    // Close may observe cancellation after submitting bitmap work. Drain that
+    // work before derived builders roll back transactions or clear rowset 
caches.
+    if (_req.load_cancel_status && !_req.load_cancel_status->ok()) {

Review Comment:
   [P1] Add a deterministic test for the new shared-cancellation/final-owner 
contract. This path now relies on the last `DeltaWriter` owner stopping flush 
producers and draining outstanding bitmap work before rollback, cache clearing, 
or segment deletion, but no test sets `load_cancel_status`, publishes 
cancellation with a callback blocked, and then drops that final owner. Existing 
tests cover the lower-level token and group-flush primitives separately; they 
do not exercise this new composition. Please add a focused barrier/debug-point 
test that proves destruction cannot complete until the callback is released.



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