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

ExportSnapshot may write snapshot info file to wrong directory when specifying target name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 1.4.0, 2.0.0
    • snapshots
    • None
    • Reviewed

    Description

      Exportsnapshot will write a new snapshot info file when specifying the target name:

          if (!targetName.equals(snapshotName)) {
            SnapshotDescription snapshotDesc =
              SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir)
                .toBuilder()
                .setName(targetName)
                .build();
            SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, snapshotTmpDir, outputFs);
          }
      

      The snapshot info file will be written to the snapshot tmp directory, however, it should be directly written to the snapshot directory if snapshot.export.skip.tmp is true. In addition, owner and permission should be set for the new snapshot info file when needed.

      Attachments

        1. HBASE-17347-v1.patch
          2 kB
          Jianwei Cui

        Activity

          People

            cuijianwei Jianwei Cui
            cuijianwei Jianwei Cui
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: