CRZbulabula commented on code in PR #17609:
URL: https://github.com/apache/iotdb/pull/17609#discussion_r3200312108
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AddConfigNodeProcedure.java:
##########
@@ -80,9 +80,9 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env,
AddConfigNodeState s
LOG.info("Successfully ADD_PEER {}", tConfigNodeLocation);
break;
case REGISTER_SUCCESS:
- env.notifyRegisterSuccess(tConfigNodeLocation);
-
env.createConfigNodeHeartbeatCache(tConfigNodeLocation.getConfigNodeId());
env.applyConfigNode(tConfigNodeLocation, versionInfo);
Review Comment:
**`applyConfigNode` can now throw `IllegalStateException`**
After the refactoring in `NodeManager.applyConfigNode()`, this call can
throw `IllegalStateException` if the rollback after a version-write failure
succeeds. The exception will be caught by the `catch (Exception e)` at line 89,
which calls `setFailure(...)` only if `isRollbackSupported(state)` returns true
for `REGISTER_SUCCESS`.
Please verify that
`isRollbackSupported(AddConfigNodeState.REGISTER_SUCCESS)` returns `true`,
otherwise the exception might be silently swallowed and the procedure could
continue in an inconsistent 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]