You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Jan Van Besien (JIRA)" <ji...@apache.org> on 2016/10/27 09:26:58 UTC

[jira] [Created] (HBASE-16953) ExportSnapshot -overwrite is not atomic (enough)

Jan Van Besien created HBASE-16953:
--------------------------------------

             Summary: ExportSnapshot -overwrite is not atomic (enough)
                 Key: HBASE-16953
                 URL: https://issues.apache.org/jira/browse/HBASE-16953
             Project: HBase
          Issue Type: Improvement
            Reporter: Jan Van Besien


Use case: we use hbase snapshots and ExportSnapshot to regularly export snapshots to another cluster. We want to have a snapshot ready on the destination cluster at all times.

Currently this requires either to use new unique snapshot names every time (which is cumbersome and also requires regular cleanup) or to use the '-overwrite' option of the ExportSnapshot tool. However the -overwrite option is implemented such that the snapshot dir (in /hbase/.hbase-snapshot) is deleted before copying the actual data files and only recreated (atomically renamed from inside /hbase/.hbase-snapshot/.tmp) afterwards. This leaves a (large) window in which there is no snapshot at all on the destination cluster.

Wouldn't it be better to leave the old snapshot in place (perhaps renamed or moved in a separate directory) all the way until after the atomic rename of the new snapshot. That would ensure there is always a working snapshot when using ExportSnapshot for this use case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)