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


##########
be/src/exec/sink/writer/vtablet_writer.cpp:
##########
@@ -777,13 +889,17 @@ Status VNodeChannel::add_block(Block* block, const 
Payload* payload) {
     }
 
     SCOPED_RAW_TIMER(&_stat.append_node_channel_ns);
-    st = block->append_to_block_by_selector(_cur_mutable_block.get(), 
*(payload->first));
+    st = block->append_to_block_by_selector(_cur_mutable_block.get(), 
*payload->row_ids);
     if (!st.ok()) {
         _cancel_with_msg(fmt::format("{}, err: {}", channel_info(), 
st.to_string()));
         return st;
     }

Review Comment:
   Current head already keeps rolling-upgrade compatibility for this path. In 
adaptive add-block requests, the sender still appends a compatibility tablet id 
from `_adaptive_partition_compat_tablets`, so an old receiver will not see an 
empty `tablet_ids` list. The EOS split path also clears those compatibility 
tablet ids before sending the empty EOS request. I think no additional 
receiver-version gate is needed for this thread.



##########
be/src/load/channel/tablets_channel.h:
##########
@@ -185,6 +197,10 @@ class BaseTabletsChannel {
     std::unordered_set<int64_t> _reducing_tablets;
 
     std::unordered_set<int64_t> _partition_ids;
+    std::shared_ptr<AdaptiveRandomBucketState> _adaptive_random_bucket_state;
+    std::mutex _partition_route_locks_lock;
+    std::unordered_map<int32_t, std::unordered_map<int64_t, 
std::shared_ptr<std::mutex>>>

Review Comment:
   Added comments for `_sender_partition_route_locks`: the map lock only 
protects the lock map, and each per-sender/partition lock serializes 
current-tablet selection, write, and rotation for one adaptive random-bucket 
stream.



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