Pengzna commented on code in PR #16303:
URL: https://github.com/apache/iotdb/pull/16303#discussion_r2525565299
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java:
##########
@@ -477,12 +477,17 @@ private void countDownChildren(RootProcedureStack
rootProcStack, Procedure<Env>
}
if (parent != null && parent.tryRunnable()) {
// If success, means all its children have completed, move parent to
front of the queue.
- store.update(parent);
- scheduler.addFront(parent);
- LOG.info(
- "Finished subprocedure pid={}, resume processing ppid={}",
- proc.getProcId(),
- parent.getProcId());
+ try {
+ store.update(parent);
+ // do not add this procedure when exception occurred
+ scheduler.addFront(parent);
+ LOG.info(
+ "Finished subprocedure pid={}, resume processing ppid={}",
+ proc.getProcId(),
+ parent.getProcId());
+ } catch (Exception e) {
+ LOG.warn("Failed to update parent on countdown", e);
+ }
Review Comment:
Please refer to the newest version. For steps that are idempotent, we simply
printing a log is enough. Even new CN leader may restore this procedure from a
old state through raft log, the new CN leader will converge to the correct
state eventually.
--
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]