github-actions[bot] commented on code in PR #62747:
URL: https://github.com/apache/doris/pull/62747#discussion_r3130044563
##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java:
##########
@@ -297,13 +304,73 @@ private void init() {
}
}
+ private void resolveCloudCluster() throws AnalysisException {
+ String requested = validateComputeGroupProperty(properties);
+ if (requested != null) {
+ this.cloudCluster = requested;
+ return;
+ }
+ // fall back to session-resolved cluster in cloud mode
+ if (!Config.isCloudMode() || ConnectContext.get() == null) {
+ return;
+ }
+ String sessionCluster;
+ try {
+ sessionCluster = ConnectContext.get().getCloudCluster();
+ } catch (ComputeGroupException e) {
+ log.warn("jobId={} failed to resolve cloud cluster", getJobId(),
e);
Review Comment:
This still fails open when cluster resolution throws. That is distinct from
the already-raised `session.cloud_cluster` issue: here
`ConnectContext.get().getCloudCluster()` does not return an unauthorized
session value, it throws (for example because the creator has no `USAGE` on any
compute group). The catch just logs and leaves `cloudCluster == null`, and the
non-TVF path later reaches `StreamingJobUtils.selectBackend(null)`, which falls
back to the global backend chooser with no cluster privilege check. In cloud
mode CREATE should reject this state instead of silently accepting an unbound
job, otherwise a user can still create a MySQL/Postgres streaming job and route
FE->BE CDC RPCs to arbitrary backends without any verified compute-group
binding.
--
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]