[ConfigNode] Revert procedure-based RegionGroup cleanup and fix RegionMaintainer retries - #18404
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #18404 +/- ##
============================================
+ Coverage 43.49% 43.51% +0.02%
Complexity 374 374
============================================
Files 5394 5393 -1
Lines 385391 385493 +102
Branches 50148 50169 +21
============================================
+ Hits 167624 167760 +136
+ Misses 217767 217733 -34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
This PR reverts the procedure-based RegionGroup cleanup introduced by #18033 and its follow-up fix #18097, while keeping the restored RegionMaintainer flow safe when a successful DataNode RPC response is lost.
With the release approaching, this change returns Region replica maintenance to the previous implementation instead of shipping the new procedure flow without enough time for further stabilization.
The revert:
PartitionManager.maintainRegionReplicas();RemoveRegionGroupProcedure, its state, serialization registration, and tests;CreateRegionGroupsProcedureandDeleteDatabaseProcedure;The RegionMaintainer compatibility fix:
REGION_ALREADY_EXISTSandREGION_NOT_EXISTstatuses;SUCCESS_STATUSwhen this request performed any required deletion, andREGION_NOT_EXISTonly when both the consensus group and local Region were already absent;SUCCESS_STATUSorREGION_ALREADY_EXISTS, and DELETE tasks onSUCCESS_STATUSorREGION_NOT_EXIST.This prevents RegionMaintain tasks from retrying forever when CREATE or REMOVE completed on the DataNode but the corresponding 200 response did not reach the ConfigNode.
Compatibility note
This revert removes procedure type
207and theDELETE_DATABASE_CONFIGstate added by #18033. A cluster that has already run a build containing #18033 should ensure that noRemoveRegionGroupProcedureor affectedDeleteDatabaseProcedureremains persisted or in flight before switching to a build containing this revert. Mixed-version rolling rollback is not recommended.This PR also adds internal status codes
911and912for Region maintenance. ConfigNodes and DataNodes should use the same build during this rollback.Tests
mvn spotless:apply -pl iotdb-client/service-rpc,iotdb-core/datanode,iotdb-core/confignodemvn test-compile -pl iotdb-client/service-rpc,iotdb-core/datanode,iotdb-core/confignode -am -DskipTestsmvn test-compile -pl iotdb-client/service-rpc,iotdb-core/datanode,iotdb-core/confignode -am -P with-zh-locale -DskipTestsmvn test -pl iotdb-core/confignode -am -Dtest=PartitionManagerRegionMaintainTest -Dsurefire.failIfNoSpecifiedTests=falsemvn test -pl iotdb-core/confignode -Dtest=PartitionInfoTest