Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23202

ExportSnapshot (import) will fail if copying files to root directory takes longer than cleaner TTL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0, 1.5.0, 2.2.1, 1.4.11, 2.1.7
    • Fix Version/s: None
    • Component/s: snapshots
    • Labels:
      None

      Description

      HBASE-17330 removed the checking of the snapshot .tmp directory when determining which files are candidates for deletes. It appears that in the latest branches, this isn't an issue for taking a snapshot as it checks whether a snapshot is in progress via the SnapshotManager.

      However, when using the ExportSnapshot tool to import a snapshot into a cluster, it will first copy the snapshot manifest into /.snapshot/.tmp/<snapshot> [1], copies the files, and then renames the snapshot manifest to the final snapshot directory. If the copyFiles job takes longer than the cleaner TTL, the ExportSnapshot job will fail because HFiles will get deleted before the snapshot is committed to the final directory.

      The ExportSnapshot tool already has a functionality to skipTmp and write the manifest directly to the final location. However, this has unintended consequences such as the snapshot appearing to the user before it is usable. So it looks like we will have to bring back the tmp directory check to avoid this situation.

      [1] https://github.com/apache/hbase/blob/master/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java#L1029

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gxcheng Guangxu Cheng
                Reporter:
                zyork Zach York
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: