CRZbulabula commented on code in PR #18212:
URL: https://github.com/apache/iotdb/pull/18212#discussion_r3585329186
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java:
##########
@@ -810,6 +810,13 @@ private long pushProcedure(Procedure<Env> procedure) {
// Update metrics on start of a procedure
procedure.updateMetricsOnSubmit(getEnvironment());
RootProcedureStack<Env> stack = new RootProcedureStack<>();
+ // Persisting a newly submitted procedure may serialize and deserialize it
through the
+ // consensus layer. If that process marks the procedure as failed before
it is scheduled, the
+ // rollback stack still needs an entry so the executor can finish the
failed procedure instead
+ // of leaving it in the active procedure map forever.
+ if (procedure.isFailed()) {
+ stack.addRollbackStep(procedure);
+ }
Review Comment:
Addressed in 8b9589b5f0. The submission path now persists the failed
procedure again after initializing its rollback entry. Recovery also
reconstructs a missing rollback entry for a FAILED procedure with no stack
indexes, covering the crash window before that second persistence completes and
any previously stored affected procedure. Added regression coverage for both
persistence-before-scheduling and restart recovery.
--
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]