tanyastickles commented on code in PR #8700:
URL: https://github.com/apache/hbase/pull/8700#discussion_r4097078268
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java:
##########
@@ -376,6 +376,11 @@ public void splitRegion(RegionInfo parent, RegionInfo
splitA, RegionInfo splitB,
Put putParent = MetaTableAccessor.makePutFromRegionInfo(
RegionInfoBuilder.newBuilder(parent).setOffline(true).setSplit(true).build(),
time);
MetaTableAccessor.addDaughtersToPut(putParent, splitA, splitB);
+ // Persist the terminal SPLIT state so that after a master failover
loadMeta reconstructs the
+ // parent as state=SPLIT rather than falling back to OFFLINE, which would
make it eligible for
+ // re-assignment via processOfflineRegions. See HBASE-30353.
+ MetaTableAccessor.addRegionStateToPut(putParent,
RegionInfo.DEFAULT_REPLICA_ID,
Review Comment:
correct me if i'm wrong, but it looks pretty common to have drift between
in-memory state and state that's written to the metafile.
`SPLITTING`, `SPLITTING_NEW`, `MERGING`, `FAILED_OPEN`, and some others are
all in memory state that don't get written to the meta. those are more
transient than `SPLIT`.
we already keep track of whether the region is split in `split=true`, so i
don't have have a strong opinion on approach here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]