github-actions[bot] commented on code in PR #65555:
URL: https://github.com/apache/doris/pull/65555#discussion_r3575701029
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/load/CloudRoutineLoadManager.java:
##########
@@ -68,7 +68,13 @@ public void replayCreateRoutineLoadJob(RoutineLoadJob
routineLoadJob) {
@Override
public void replayChangeRoutineLoadJob(RoutineLoadOperation operation) {
- getJob(operation.getId()).setCloudCluster();
+ RoutineLoadJob job = getJob(operation.getId());
+ if (job == null) {
+ LOG.warn("routine load job {} does not exist when replaying change
routine load job, ignore it",
+ operation.getId());
+ return;
Review Comment:
This makes the orphaned change record replayable, but it still leaves the
transaction callback state different from the original master. A valid ordering
for this failure is: the job is loaded from image as non-final, so
`readFields()` registers its txn callback; cleanup replays
`OP_REMOVE_ROUTINE_LOAD_JOB` first and removes the job from
`idToRoutineLoadJob` but does not remove that callback; then this branch sees
the later `OP_CHANGE_ROUTINE_LOAD_JOB` and returns before `updateState(...,
isReplay=true)` can perform the final-state `removeCallback(id)`. After replay
continues, `TransactionState.replaySetTransactionStatus()` and the cloud commit
path look callbacks up directly by id, so that stale `RoutineLoadJob` can still
receive txn callbacks even though the manager no longer contains the job.
Please clear the callback in this missing-job path, or preferably in
`replayRemoveOldRoutineLoad()`, before ignoring the orphaned change.
--
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]