sollhui commented on code in PR #66016:
URL: https://github.com/apache/doris/pull/66016#discussion_r3662359486


##########
be/src/exec/sink/writer/vtablet_writer_v2.cpp:
##########
@@ -726,9 +726,18 @@ Status VTabletWriterV2::close(Status exec_status) {
         // close_wait on all non-incremental streams, even if this is not the 
last sink.
         // because some per-instance data structures are now shared among all 
sinks
         // due to sharing delta writers and load stream stubs.
-        // Do not need to wait after quorum success,
-        // for first-stage close_wait only ensure incremental streams load has 
been completed,
-        // unified waiting in the second-stage close_wait.
+        //

Review Comment:
   suggest:
   //
   // This stage is also a cross-source fence for a source that has incremental
   // streams: it must not close those streams before every other source has
   // entered the close phase and can no longer open new incremental streams.
   //
   // A stream contributes to quorum only after CLOSE_LOAD has been sent
   // (LoadStreamStub::is_closing) and the sender has observed both EOS and
   // StreamClose. When this source has incremental streams, its non-incremental
   // CLOSE_LOAD carries num_incremental_streams > 0, so the destination defers
   // StreamClose until CLOSE_LOAD has arrived from all sources. Therefore, any
   // non-incremental stream counted towards quorum is a valid lifecycle fence
   // for this source.
   //
   // A source without incremental streams does not require this fence because
   // it has no incremental streams to close.
   //
   // The remaining streams do not need to be waited for in this stage; they are
   // included in the second-stage close_wait.
   //



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