Repository navigation
Make IoTConsensus peer-list reset retries best effort and fix Daily CI regressions - #18929
Merged
CRZbulabula merged 1 commit intoOct 20, 2026
Conversation
Finish node removal after bounded peer-list reset retries are exhausted. Keep metadata failures fatal and simplify caller-controlled retry handling. Cover exhaustion paths and adapt regression fixtures to targeted region lookups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
retryStepto 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 delegategetRegionDatabase()andgetReplicaSets()to the livePartitionInfo, including the deleted-Region case.Tests
RestartDuringRemovePeerTest,RemoveDataNodesProcedureTest, andRemovePeerRestartConsensusTest. Cover reset exhaustion returning success, metadata exhaustion preserving failure and cleanup, and real IoTConsensus peer repair followed by continued writes.RegionReplicaSetLookupTest(including DataRegion and SchemaRegion parameters). No failures, errors, or skipped tests.IoTDBRegionMigrateConfigNodeCrashIoTV1IT#cnCrashDuringRemoveRegionLocationCacheTest.IoTDBRegionMigrateConfigNodeCrashForRatisIT#cnCrashDuringRemoveRegionLocationCacheTest.IoTDBRemoveDataNodeNormalIT#success1C4DIoTTestUseTableSQL.distribution).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.
This PR has:
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, andRemovePeerRestartConsensusTest: validate exhaustion behavior and adapt fixtures to targeted Region lookups.