HBASE-30287 Filter offline and split regions from SnapshotRegionLocator - #8576
Conversation
wchevreuil
left a comment
There was a problem hiding this comment.
What if the offline/split region has hfiles still referenced by online regions links/ref-files?
Thanks for raising this. You're right that an offline split parent can still own HFiles referenced by its daughters. The filter here only changes the RegionLocator view used to build the reducer partition boundaries. It does not modify the snapshot manifest or filter the files copied by ExportSnapshot. The full backup path still visits every region manifest, and reference files are resolved back to the parent HFile. The restore path keeps the existing Reference/HFileLink handling as well. So the parent HFiles are still preserved; the parent region is only excluded as a logical target region. The current unit test does not cover a real reference-file case, though. I can add a focused test for that if you think it would be useful. |
Great, thanks for confirming! |
…or (#8576) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
JIRA: https://issues.apache.org/jira/browse/HBASE-30287
What changes were proposed in this pull request?
Filter offline and split entries while building
SnapshotRegionLocator. This also adds a regression test with active, offline, and split entries that share start keys, and verifies region listing, start keys, and row lookup.Why are the changes needed?
Snapshot manifests can retain split parents.
SnapshotRegionLocatorpreviously exposed those entries alongside active daughter regions. This could makeHFileOutputFormat2configure more reducers than the number of unique keys written to the partition file, causing incremental backup to fail withWrong number of partitions in keyset.Filtering inactive entries in the locator keeps its region view consistent for all callers.
How was this patch tested?