github-actions[bot] commented on code in PR #69749:
URL: https://github.com/apache/doris/pull/69749#discussion_r4412010230
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/kafka/KafkaRoutineLoadJob.java:
##########
@@ -452,6 +453,21 @@ protected boolean refreshKafkaPartitions(boolean
needAutoResume) throws UserExce
}
private boolean updateKafkaPartitions() throws UserException {
+ // The metadata request goes to the backends of the declared compute
group, and after RESUME it runs
+ // before any task, so check the group here as
RoutineLoadTaskScheduler does before each task. A
+ // dropped group would otherwise pause the job with "no alive
backends" and the Kafka advice below.
+ try {
+
ComputeGroupBindingUtil.checkComputeGroupBeforeTask(getUserIdentity(),
getDeclaredComputeGroup());
+ } catch (UserException e) {
+ LOG.warn(new LogBuilder(LogKey.ROUTINE_LOAD_JOB, id)
+ .add("error_msg", e.getMessage())
+ .build());
+ if (this.state == JobState.NEED_SCHEDULE) {
+ unprotectUpdateState(JobState.PAUSED, new
ErrorReason(e.getErrorCode(), e.getMessage()),
Review Comment:
[P2] Lock the binding-failure pause against concurrent STOP
`RoutineLoadJob.update()` calls this refresh before taking the job lock.
With an existing healthy group/topic but revoked owner USAGE, this new catch
can pass `checkStateTransform(PAUSED)`, then a SQL STOP can set STOPPED, remove
the transaction callback and journal STOPPED, before this thread executes
`executePause()` and journals PAUSED. The completed STOP is undone on the
master, while replay rejects STOPPED -> PAUSED. The adjacent metadata-error
path already has this pattern, but revoked USAGE reaches this new catch even
when metadata would succeed. Acquire the job write lock and recheck
NEED_SCHEDULE before changing the state.
--
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]