github-actions[bot] commented on code in PR #69749:
URL: https://github.com/apache/doris/pull/69749#discussion_r4420333758
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateRoutineLoadInfo.java:
##########
@@ -599,18 +649,35 @@ public void checkJobProperties() throws UserException {
RoutineLoadJob.DEFAULT_LOAD_TO_SINGLE_TABLET,
LOAD_TO_SINGLE_TABLET + " should be a boolean");
+ String inputComputeGroupStr = jobProperties.get(COMPUTE_GROUP);
+ if (!StringUtils.isEmpty(inputComputeGroupStr)) {
+ // The name is always adopted, because the workload group check
below resolves in its
+ // namespace, but it is only validated when a user is actually
declaring it. On the
+ // metadata load path the declared group may have been dropped
long ago, and failing
+ // there would cancel the job permanently instead of pausing it -
see isReplay.
Review Comment:
[P2] Check routine-load authorization before activating the target group
The new `compute_group` branch calls `activateDeclaredComputeGroup` during
statement validation. For CREATE, `CreateRoutineLoadInfo.validate()` runs
before `RoutineLoadManager.createRoutineLoadJob()` checks table/database LOAD;
for ALTER, `AlterRoutineLoadCommand.validate()` runs before
`alterRoutineLoadJob()` calls `checkPrivAndGetJob()`. A user who lacks LOAD on
the table/job can therefore wake a suspended compute group (or get a
group-specific validation error) even though the DDL will be rejected. Move the
side-effecting validation/activation after the existing LOAD authorization
gate, or make it conditional on an already-authorized job.
--
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]