Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0-alpha-4, 2.5.6, 4.0.0-alpha-1
-
None
Description
One of our users has brought up a use-case where they need to truncate a region to delete data within a specific range. There are two scenarios to consider:
- In the first scenario, the region boundaries involve a time range defined through pre-splitting, and user is looking to efficiently clean old date data. If HBase can directly truncate the region from the file system and then the user can merge the empty region with adjacent regions to effectively eliminate it which will be more optimized compared to deleting the data using Delete API.
- In another case, if the HFile for that region becomes corrupted for some reason, user want to get rid of the HFile and reload the entire region to avoid consistency issues and ensure performance.
we can do this by taking the region offline and taking write lock to avoid the consideration of race conditions involving Region In Transition (RITs), region re-opening, and merge/split scenarios.