github-actions[bot] commented on code in PR #62661:
URL: https://github.com/apache/doris/pull/62661#discussion_r3417586417
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -5745,4 +5768,129 @@ private TStatus checkMaster() {
}
return status;
}
+
+ private static final class AdaptiveBucketSinkContext {
+ private final boolean enableAdaptiveRandomBucket;
+ private final List<Long> sinkBackendIds;
+ private final int planFragmentNum;
+
+ private AdaptiveBucketSinkContext(boolean enableAdaptiveRandomBucket,
List<Long> sinkBackendIds,
+ int planFragmentNum) {
+ this.enableAdaptiveRandomBucket = enableAdaptiveRandomBucket;
Review Comment:
This runtime adaptive context needs to be scoped to the table/sink that
issued the create/replace-partition RPC. `TCreatePartitionRequest` and
`TReplacePartitionRequest` already carry `table_id`, but this helper only takes
`queryId`; the classic branch and the Nereids loop aggregate every adaptive
OLAP sink under the coordinator. Multi-table stream/routine load can generate
several table plans under the same load id/query id, so when one table
auto-creates or replaces a random partition,
`assignAdaptiveBucketToPartition()` may compute its selected buckets with sink
backends and `planFragmentNum` from unrelated tables. That changes
`targetBucketNum`, selected bucket order, and the returned
`bucket_be_id`/`local_bucket_seqs` compared with that table's initial sink
assignment. This is distinct from the existing classic-fallback thread: the
helper now finds a context, but it can be the union of multiple sinks. Please
key/lookup the collected context by the requested table or sink, for
example using `TOlapTableSink.table_id` from the RPC, instead of aggregating
at query level.
--
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]