Skip to content

HBASE-30357 OpenRegionProcedure#restoreSucceedState ignores persisted transitionCode, forcing OPEN even after a real FAILED_OPEN - #8677

Open
mnpoonia wants to merge 3 commits into
apache:branch-2from
mnpoonia:HBASE-30357-branch-2
Open

mnpoonia wants to merge 3 commits into
apache:branch-2from
mnpoonia:HBASE-30357-branch-2

Conversation

@mnpoonia

Copy link
Copy Markdown
Contributor

Summary

  • Backport of the master fix (HBASE-30357) to branch-2.
  • OpenRegionProcedure#restoreSucceedState was ignoring the persisted TransitionCode, always forcing the region state to OPEN on master-restart restore even when the persisted transition was actually FAILED_OPEN. Now checks transitionCode == FAILED_OPEN and calls am.regionFailedOpen(regionNode, false), matching the live reportTransition path.
  • Threaded TransitionCode through RegionRemoteProcedureBase#restoreSucceedState/stateLoaded so both OpenRegionProcedure and CloseRegionProcedure receive it (close has no failure variant, so it's unused there).
  • Added TestOpenRegionProcedureRestoreFailedOpen, which restarts a real ProcedureExecutor to reproduce the crash window.

Test plan

  • Ported test compiles against branch-2 APIs (HBaseTestingUtility, JUnit5 HBaseJupiterExtension).
  • Note: local run of the new test on this branch-2 checkout (JDK8 + -Dhadoop.profile=3.0) is flaky due to a pre-existing race in the test's synchronization (a non-interruptible regionNode.lock() held across an RPC call can deadlock with ProcedureExecutor#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.

… transitionCode, forcing OPEN even after a real FAILED_OPEN

Backport of the master fix to branch-2.
@mnpoonia

mnpoonia commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

branch-2 test is failing because branch-2 doesnot have HBASE-28199 HBASE-28240.
have to rethink how to write it for branch-2
@virajjasani

@mnpoonia

Copy link
Copy Markdown
Contributor Author

@virajjasani is it okay if we don't include test in branch-2?

@virajjasani

Copy link
Copy Markdown
Contributor

@virajjasani is it okay if we don't include test in branch-2?

We can include test and keep it and add @ignored with reason

@Apache9

Apache9 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

So what is the problem here? The test can not work on branch-2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants