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


##########
be/src/exec/sink/vrow_distribution.cpp:
##########
@@ -136,13 +136,16 @@ Status VRowDistribution::automatic_create_partition() {
         } else {
             master_addr = _vpartition->get_master_address();
         }
+        // Remote partition callbacks must use the same external policy as 
their write channels.
         int time_out = _state->execution_timeout() * 1000;
         RETURN_IF_ERROR(ThriftRpcHelper::rpc<FrontendServiceClient>(
                 master_addr->hostname, master_addr->port,
                 [&request, &result](FrontendServiceConnection& client) {
                     client->createPartition(result, request);
                 },
-                time_out));
+                time_out,
+                _remote_endpoint ? 
ExecEnv::GetInstance()->remote_frontend_client_cache()

Review Comment:
   [P2] Carry remote policy into the exchange tablet partitioner
   
   With local private Thrift TLS enabled and a plaintext remote Doris catalog, 
a parallel `INSERT SELECT` from a local table into a remote HASH auto-partition 
UNIQUE table can follow `Local Scan -> Exchange(TABLET_ID_SHUFFLE) -> remote 
tablet sink` with strict DML consistency enabled and multiple destination 
instances (the single-destination shortcut bypasses tablet partitioning). 
`RemoteOlapInsertExecutor.finalizeSink()` supplies the exchange with the remote 
partition metadata, but `TabletSinkHashPartitioner::open()` initializes a third 
`VRowDistribution` without `remote_endpoint`, leaving it false. When a row 
needs a new partition, `try_cut_in_line()` reaches this branch, selects the 
internal frontend cache and sends TLS to the plaintext remote FE, so the insert 
fails before the correctly flagged tablet writer can handle it. Carry the 
endpoint policy through the exchange tablet-sink metadata and set its 
row-distribution context, with a regression for this insert. This is a distinct
  local-worker partition callback from the existing remote metadata and 
cross-cluster worker-exchange threads.



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