[
https://issues.apache.org/jira/browse/HBASE-29346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Prathyusha updated HBASE-29346:
-------------------------------
Description:
Reproduce steps
# Create a Snapshot on a table
# Restore that snapshot on a temporary restoreDirectory instead of the same
table
# Delete that snapshot
# Disable compactions and create Split/Merge
# Create another snapshot
# Restore that snapshot on to the same restoreDirectory from Step-2
# It archives the closed parent regions from /hbase/data actual table instead
of temporary restoreDirectory leaving dangling references in daughter region
Proposed immediate fix -
RestoreSnapshotHelper does {{restore, add, remove}} regions.
Restore/Add operations use {{tableDir}} of RestoreSnapshotHelper (which is
constructed from {{{}restoreDir{}}}) to construct {{RegionDir}} paths
We should do the same strategy in removeRegions path also,
currently
[RestoreSnapshotHelper.removeHdfsRegion|https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java#L416]
currently uses
[HFileArchiver.archiveRegion|https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java#L104]
which essentially is constructing table from rootDir instead of restoreDir
was:
Reproduce steps
# Create a Snapshot on a table
# Restore that snapshot on a temporary restoreDirectory instead of the same
table
# Delete that snapshot
# Disable compactions and create Split/Merge
# Create another snapshot
# Restore that snapshot on to the same restoreDirectory from Step-2
# It archives the closed parent regions from /hbase/data actual table instead
of temporary restoreDirectory leaving dangling references in daughter region
> Multiple Snapshot restores on the same restore temporary directory resulting
> into archive of regions from /hbase/data folder resulting in Dataloss
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-29346
> URL: https://issues.apache.org/jira/browse/HBASE-29346
> Project: HBase
> Issue Type: Bug
> Reporter: Prathyusha
> Assignee: Prathyusha
> Priority: Major
>
> Reproduce steps
> # Create a Snapshot on a table
> # Restore that snapshot on a temporary restoreDirectory instead of the same
> table
> # Delete that snapshot
> # Disable compactions and create Split/Merge
> # Create another snapshot
> # Restore that snapshot on to the same restoreDirectory from Step-2
> # It archives the closed parent regions from /hbase/data actual table
> instead of temporary restoreDirectory leaving dangling references in daughter
> region
> Proposed immediate fix -
> RestoreSnapshotHelper does {{restore, add, remove}} regions.
> Restore/Add operations use {{tableDir}} of RestoreSnapshotHelper (which is
> constructed from {{{}restoreDir{}}}) to construct {{RegionDir}} paths
> We should do the same strategy in removeRegions path also,
> currently
> [RestoreSnapshotHelper.removeHdfsRegion|https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java#L416]
> currently uses
> [HFileArchiver.archiveRegion|https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java#L104]
> which essentially is constructing table from rootDir instead of restoreDir
--
This message was sent by Atlassian Jira
(v8.20.10#820010)