HBASE-30169 Split completed parent region added to RIT list on host RS and master crash#8264
HBASE-30169 Split completed parent region added to RIT list on host RS and master crash#8264Umeshkumar9414 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an assignment tracking bug where split/merged parent regions could be incorrectly added to the master’s Regions-In-Transition (RIT) list during RegionServer crash handling, especially across master restarts. This improves correctness of assignment state tracking and adds regression coverage for the crash + master restart scenario.
Changes:
- Skip adding split/merged (and replica) regions to RIT during
regionCrashed, and refactor shared guards into helpers. - Remove the broken
AssignmentManager.isRegionInTransition(RegionInfo)API and replace test checks with an encoded-name-based lookup helper. - Add a regression test that splits a region, expires the hosting RS, restarts the master, and verifies the split parent is not in RIT.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java | Updates tests to use the new encoded-name-based RIT check utility. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRegionSplit.java | Adds regression test for split-parent not appearing in RIT after RS+master crash/restart; modernizes a few assertions. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/AssignmentTestingUtil.java | Introduces encoded-name-based isRegionInTransition helper and updates existing wait helper to use it. |
| hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionInTransitionTracker.java | Adds split/merged guard in regionCrashed, extracts helper predicates, and removes the public containsKey-based RIT query method. |
| hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java | Removes the now-deleted isRegionInTransition(RegionInfo) API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5bded49 to
a6fa265
Compare
|
Failing test is related to compaction. Unrelated to PR. Can look seperatly later. |
a6fa265 to
1871abe
Compare
|
@virajjasani , @Apache9 is there any concern on this PR or can we merge this ? |
virajjasani
left a comment
There was a problem hiding this comment.
Left minor nits, +1 otherwise
| assertFalse(AssignmentTestingUtil.isRegionInTransition(regions[0], | ||
| UTIL.getHBaseCluster().getMaster().getAssignmentManager())); |
There was a problem hiding this comment.
After this, can we also check for region[0] to be split?
e.g.
assertTrue(UTIL.getHBaseCluster().getMaster()
.getAssignmentManager().getRegionStates().getRegionState(regions[0]).isSplit());
There was a problem hiding this comment.
instead of this I am using getOrCreateRegionStateNode(regions[0]).isSplit() as it do both the necessary check for split
| assertFalse(AssignmentTestingUtil.isRegionInTransition(regions[0], | ||
| UTIL.getHBaseCluster().getMaster().getAssignmentManager())); |
There was a problem hiding this comment.
same here after this? check for region[0] being split and offline?
1871abe to
3e0328c
Compare
with encoded-name-based lookup in test utility.