Repository navigation
Restore DataNode removal cleanup after child procedure failures - #18947
Merged
CRZbulabula merged 1 commit intoOct 20, 2026
Merged
CRZbulabula merged 1 commit into
CRZbulabula merged 1 commit into
Conversation
Allow STOP_DATA_NODE rollback cleanup under the commit-point guard. Preserve execution retries and verify transient cleanup failures stay retryable.
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
Restore cleanup after a migration child fails
After #18909, the executor skips rollback for procedures whose
isRollbackSupported()returns false.RemoveDataNodesProcedurealways returned false even though itsSTOP_DATA_NODErollback performs necessary node cleanup. If a migration child exhausts its metadata-removal retries, the root procedure finishes without restoring the original statuses of nodes that still host Regions or unregistering and stopping drained nodes. Removal targets can therefore remain inRemoving.Allow rollback at
STOP_DATA_NODEso the existing cleanup runs while preserving the child failure and completed Region migrations. Keep execution retries independent of rollback eligibility: a transient error during normal cleanup must still retry instead of immediately failing the procedure.Tests
RemoveDataNodePersistenceTest.testProcedureExecutorCanActuallyRetryCompensationCommitFailureto assert that a transient cleanup failure and its successful retry leave no procedure failure.RemoveDataNodesProcedureTest.metadataRetryExhaustionRetriesFailedNodeStatusCleanupnow passes, including node-status restoration, stopping drained nodes, and delayed retry after an injected cleanup failure.RemoveDataNodesProcedureTest(3),RemoveDataNodePersistenceTest(23), andStateMachineProcedureTest(5), with no failures, errors, or skipped tests. Spotless passed.Side effects and risks
A failed removal can now remain active while its existing rollback cleanup retries. Completed Region migrations are retained, and the original child failure remains reported. Rollback eligibility changes only at
STOP_DATA_NODE; normal execution retains its existing retry threshold. No procedure-state IDs or serialization formats change.This PR has:
Key changed/added classes (or packages if there are too many classes) in this PR
RemoveDataNodesProcedure: allow failure cleanup atSTOP_DATA_NODEand preserve normal execution retries.RemoveDataNodePersistenceTest: verify transient cleanup failures remain retryable without leaving a procedure failure.