Alchuang22-dev opened a new pull request, #17862:
URL: https://github.com/apache/iotdb/pull/17862
## Description
Improve restart robustness for ConfigNode and AINode by making partial
startup states explicit and preventing unsafe recovery paths.
### Content
Here are the changes:
1. Introduce explicit ConfigNode startup states and make restart detection
stricter.
2. Harden `ConsensusManager.start()` so consensus initialization failures
are propagated instead of being silently ignored.
3. Persist ConfigNode `system.properties` only after consensus group
creation, leader election, and seed ConfigNode application all succeed.
4. Harden AINode restart handling: preserve local `ainode_id`, back up old
`system.properties` on failure, and avoid implicit re-registration with a new
AINode id.
Added unit tests for:
- ConfigNode startup state classification
- Consensus startup failure handling
- Delayed ConfigNode system property persistence
- AINode restart failure and local state preservation
- Rejection of unsafe AINode restart with changed endpoint
This PR has:
- [x] been self-reviewed.
- [x] concurrent read
- [x] concurrent write
- [x] concurrent read and write
- [ ] added documentation for new or modified features or behaviors.
- [ ] added Javadocs for most classes and all non-trivial methods.
- [ ] added or updated version, __license__, or notice information
- [ ] added comments explaining the "why" and the intent of the code
wherever would not be obvious
for an unfamiliar reader.
- [x] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold
for code coverage.
- [ ] added integration tests.
- [x] been tested in a test IoTDB cluster.
<!-- Check the items by putting "x" in the brackets for the done things. Not
all of these items
apply to every PR. Remove the items which are not done or not relevant to
the PR. None of the items
from the checklist above are strictly necessary, but it would be very
helpful if you at least
self-review the PR. -->
<hr>
PTAL.
--
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]