sollhui opened a new pull request, #64356:
URL: https://github.com/apache/doris/pull/64356

   ### What problem does this PR solve?
   
   `load_tablet_idx` is used by random distribution routing. For normal random
   loads it can advance across batches, but for `load_to_single_tablet=true` it
   must remain fixed for the partition in the sink so all rows are routed to one
   tablet.
   
   For normally planned partitions this is stable because FE builds the sink 
plan
   once and all BE sink instances receive the same `load_tablet_idx`.
   
   For runtime auto partitions, each BE can independently call 
`createPartition()`
   or `replacePartition()` for the same txn and partition. Before this patch, 
the
   auto partition cache only stored tablet locations and did not store
   `load_tablet_idx`. FE also did not know whether the caller was using
   `load_to_single_tablet`, so runtime auto partitions could lose the 
single-tablet
   routing semantics or compute different tablet indexes across BE RPCs.
   
   This patch passes `load_to_single_tablet` in create/replace partition RPCs 
and
   stores the selected `load_tablet_idx` in `AutoPartitionCacheManager`. Later 
BE
   RPCs for the same txn and partition reuse the cached tablet index together 
with
   the cached tablet locations. Ordinary random loads are unchanged.


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