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


##########
be/src/exec/sink/writer/vtablet_writer_v2.cpp:
##########
@@ -158,9 +158,10 @@ Status VTabletWriterV2::_init(RuntimeState* state, 
RuntimeProfile* profile) {
     _location = _pool->add(new OlapTableLocationParam(table_sink.location));
     _nodes_info = _pool->add(new DorisNodesInfo(table_sink.nodes_info));
 
-    // if distributed column list is empty, we can ensure that tablet is with 
random distribution info
-    // and if load_to_single_tablet is set and set to true, we should find 
only one tablet in one partition
-    // for the whole olap table sink
+    // If distributed column list is empty, the table uses random distribution.
+    // Mode priority (highest to lowest):
+    //   1. FIND_TABLET_EVERY_SINK: load_to_single_tablet=true (legacy 
single-tablet mode).
+    //   2. FIND_TABLET_EVERY_BATCH: default round-robin per batch.

Review Comment:
   This V2 sink path still forces every random-distribution load into the 
legacy `FIND_TABLET_EVERY_BATCH` mode even when FE has set 
`enable_adaptive_random_bucket` and already rewritten each backend's 
`load_tablet_idx`/`local_bucket_seqs`. In cloud load-stream execution that 
means V2 does not use receiver-side local-bucket routing or memtable-flush 
rotation, but it does inherit the per-BE rewritten starting bucket from 
`ThriftPlansBuilder`/`Coordinator`. For example, two sink BEs can start from 
FE-selected buckets 0 and 1, then V2 increments the global `load_tablet_idx` 
per batch and routes subsequent batches to buckets 1 and 2 instead of staying 
within the assigned local sequences. Please either make V2 honor the adaptive 
mode end-to-end, or keep FE from applying adaptive assignments when this sink 
implementation will be used.



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