HBASE-30357 OpenRegionProcedure#restoreSucceedState ignores persisted transitionCode, forcing OPEN even after a real FAILED_OPEN - #8677
Open
mnpoonia wants to merge 3 commits into
Conversation
… transitionCode, forcing OPEN even after a real FAILED_OPEN Backport of the master fix to branch-2.
Contributor
Author
|
branch-2 test is failing because branch-2 doesnot have HBASE-28199 HBASE-28240. |
Contributor
Author
|
@virajjasani is it okay if we don't include test in branch-2? |
Contributor
We can include test and keep it and add |
Contributor
|
So what is the problem here? The test can not work on branch-2? |
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.
Summary
OpenRegionProcedure#restoreSucceedStatewas ignoring the persistedTransitionCode, always forcing the region state to OPEN on master-restart restore even when the persisted transition was actuallyFAILED_OPEN. Now checkstransitionCode == FAILED_OPENand callsam.regionFailedOpen(regionNode, false), matching the livereportTransitionpath.TransitionCodethroughRegionRemoteProcedureBase#restoreSucceedState/stateLoadedso bothOpenRegionProcedureandCloseRegionProcedurereceive it (close has no failure variant, so it's unused there).TestOpenRegionProcedureRestoreFailedOpen, which restarts a realProcedureExecutorto reproduce the crash window.Test plan
HBaseTestingUtility, JUnit5HBaseJupiterExtension).-Dhadoop.profile=3.0) is flaky due to a pre-existing race in the test's synchronization (a non-interruptibleregionNode.lock()held across an RPC call can deadlock withProcedureExecutor#stop()/join()until a 30s await times out); this race is inherited from the already-merged master version of this test and is being tracked separately rather than fixed in this backport.