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


##########
be/src/exec/sink/writer/vtablet_writer_v2.cpp:
##########
@@ -313,6 +313,11 @@ Status VTabletWriterV2::_open_streams_to_backend(int64_t 
dst_id, LoadStreamStubs
     if (node_info == nullptr) {
         return Status::InternalError("Unknown node {} in tablet location", 
dst_id);
     }
+    // FE keeps every alive replica in the location. A backend disabled for 
load must consume the
+    // normal replica-failure allowance without receiving writer RPCs.
+    if (!node_info->is_load_available) {

Review Comment:
   [P1] Preserve a close fence when all initial streams are skipped
   
   For a replication=1 automatic table with existing A on a load-disabled BE1, 
two source BEs can load new B on healthy BE2. This guard skips their only 
initial destination but returns OK. If S1 finishes before S2 opens B, its first 
close stage removes the unopened BE1 stub and exits with no streams, so B's 
purely incremental receiver commits after S1 alone and is erased. S2 then 
creates a fresh receiver for the same load/transaction; 
`TxnManager::commit_txn()` detects its different rowset, but 
`RowsetBuilder::commit_txn()` suppresses `PUSH_TRANSACTION_ALREADY_EXIST` and 
reports success. The load can succeed with S2's rows missing. Preserve a real 
cross-source fence before incremental close, and cover this two-source 
ordering; no RPC failure is needed.



##########
be/src/exec/sink/writer/vtablet_writer.cpp:
##########
@@ -176,6 +197,7 @@ Status IndexChannel::init(RuntimeState* state, const 
std::vector<TTabletWithPart
             channels.push_back(channel);
             _tablets_by_channel[replica_node_id].insert(tablet.tablet_id);
         }
+        RETURN_IF_ERROR(check_intolerable_failure());

Review Comment:
   [P2] Check replica quorum only for partitions that receive rows
   
   An unqualified legacy load (`enable_memtable_on_sink_node=false`) plans 
every partition. Let A have three alive replicas, required=2, with two backends 
load-disabled, while all destinations for B are healthy and every input row 
belongs to B. Initialization records two A failures against allowance1 and 
returns here before routing any B rows. Previously those alive A channels 
opened, and the receiver cancelled their unused writers because EOS listed only 
B. V2 checks sufficiency when selecting streams for a touched tablet. Defer 
rejection of unused tablets and add a B-only load covering disabled quorum on 
A. This is the direct BE initialization path, separate from thread 4377101036's 
removed FE error-to-participation conversion.



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