github-actions[bot] commented on code in PR #67681:
URL: https://github.com/apache/doris/pull/67681#discussion_r3964409370
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadManager.java:
##########
@@ -228,8 +228,9 @@ public void addRoutineLoadJob(RoutineLoadJob
routineLoadJob, String dbName, Stri
+ " routine load jobs are running. exceed limit.");
}
- unprotectedAddJob(routineLoadJob);
+ // Persist the initial job before the scheduler can change its
state or create tasks.
Env.getCurrentEnv().getEditLog().logCreateRoutineLoadJob(routineLoadJob);
+ unprotectedAddJob(routineLoadJob);
Review Comment:
Complete callback registration before scheduler publication.
`unprotectedAddJob` inserts into `idToRoutineLoadJob` before `addCallback`,
while the scheduler scans that map without the manager lock. With this reorder,
the table can be dropped while create is blocked on the journal; once the ID
map is updated, the scheduler can cancel the job before registration,
`removeCallback` sees nothing, and the creator then installs a callback for an
already-final job. Tasks can likewise start before their callback exists.
Please make the ID-map insertion the final readiness step (or add an equivalent
barrier) and cover the interval with a latch-based test.
--
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]