d-wang-commit opened a new pull request, #18929:
URL: https://github.com/apache/iotdb/pull/18929
## Description
Follow-up to #18892: make peer-list reset retry exhaustion non-fatal after
replica metadata removal has succeeded, and fix the affected regression
fixtures used by Daily CI.
### Make peer-list reconciliation best effort
After ConfigNode commits a Region peer removal, a retained DataNode can
remain unavailable while ConfigNode retries resetting its peer list.
Previously, exhausting these retries failed the child procedure and rolled back
the enclosing DataNode removal even though the replica metadata had already
been updated.
Allow IoTConsensus V1 peer-list reconciliation to finish without failing the
procedure after its bounded retries are exhausted. Metadata removal failures
remain fatal and retain the existing parent cleanup. Simplify `retryStep` to
accept an optional caller-supplied failure, preserve the original cause of
metadata exceptions, and remove duplicate retry logging while retaining the
existing business failure logs.
### Fix Daily CI regression fixtures
The targeted Region lookup API now queries the Region's database and then
its replica set. Fixtures that only mocked `getAllReplicaSets()` returned no
database and caused reconciliation to be skipped. Update the two affected
regression fixtures to delegate `getRegionDatabase()` and `getReplicaSets()` to
the live `PartitionInfo`, including the deleted-Region case.
### Tests
- Updated UTs: `RestartDuringRemovePeerTest`,
`RemoveDataNodesProcedureTest`, and `RemovePeerRestartConsensusTest`. Cover
reset exhaustion returning success, metadata exhaustion preserving failure and
cleanup, and real IoTConsensus peer repair followed by continued writes.
- Passed all 29 UT cases after rebasing: the three classes above plus
`RegionReplicaSetLookupTest` (including DataRegion and SchemaRegion
parameters). No failures, errors, or skipped tests.
- No new or modified ITs. Validation is in progress for these existing
cluster cases:
-
`IoTDBRegionMigrateConfigNodeCrashIoTV1IT#cnCrashDuringRemoveRegionLocationCacheTest`.
-
`IoTDBRegionMigrateConfigNodeCrashForRatisIT#cnCrashDuringRemoveRegionLocationCacheTest`.
- `IoTDBRemoveDataNodeNormalIT#success1C4DIoTTestUseTableSQL`.
- Spotless and English Java compilation passed. Chinese-locale compilation
is pending. IT and Chinese-locale results will be updated after validation
completes.
### Side effects and risks
A retained DataNode that stays unavailable beyond the retry window may
retain a stale peer list after the procedure completes; this change does not
schedule further reconciliation. Metadata failure handling and parent rollback
cleanup remain unchanged. There are no DataNode production-code changes or
procedure serialization changes.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] 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.
<hr>
##### Key changed/added classes (or packages if there are too many classes)
in this PR
- `RemoveRegionPeerProcedure`: distinguish fatal metadata failures from
best-effort peer-list reconciliation through caller-supplied retry failures.
- `ProcedureMessages`: remove redundant retry log messages in both locales.
- `RestartDuringRemovePeerTest`, `RemoveDataNodesProcedureTest`, and
`RemovePeerRestartConsensusTest`: validate exhaustion behavior and adapt
fixtures to targeted Region lookups.
--
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]