Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6517 Snapshot support for Ozone
  3. HDDS-7607

[snapshot] SnapshotDiff command lists unmodified file as modified

    XMLWordPrintableJSON

Details

    Description

      SnapshotDiff command lists unmodified file as modified.

      Steps :

      1. Create volume and bucket
      2. Put key key1 and take snapshot snap1
      3. Add new key key2 and take snapshot snap2 (key1 is unchanged)
      4. SnapshotDiff lists key2 as added and key1 as modified
      bash-4.2$ ozone sh volume create vol1
      bash-4.2$ ozone sh bucket create vol1/buck1
      bash-4.2$ ozone sh key put vol1/buck1/key1 README.md
      bash-4.2$ ozone sh snapshot create vol1/buck1 snap1
      bash-4.2$ ozone sh key put vol1/buck1/key2 CONTRIBUTING.md
      bash-4.2$ ozone sh snapshot create vol1/buck1 snap2
      bash-4.2$ ozone sh snapshot snapshotDiff vol1/buck1 snap1 snap2
      Difference between snapshot snap1 and snapshot snap2:
      +    key2
      M    key1 

      The keys captured under both snapshots have same data info :

      bash-4.2$ ozone sh key info vol1/buck1/.snapshot/snap1/key1
      {
        "volumeName" : "vol1",
        "bucketName" : "buck1",
        "name" : ".snapshot/snap1/key1",
        "dataSize" : 3811,
        "creationTime" : "2022-12-08T09:07:10.450Z",
        "modificationTime" : "2022-12-08T09:07:12.247Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "ozoneKeyLocations" : [ {
          "containerID" : 1,
          "localID" : 109611004723200001,
          "length" : 3811,
          "offset" : 0,
          "keyOffset" : 0
        } ],
        "metadata" : { }
      }
      bash-4.2$ ozone sh key info vol1/buck1/.snapshot/snap2/key1
      {
        "volumeName" : "vol1",
        "bucketName" : "buck1",
        "name" : ".snapshot/snap2/key1",
        "dataSize" : 3811,
        "creationTime" : "2022-12-08T09:07:10.450Z",
        "modificationTime" : "2022-12-08T09:07:12.247Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "ozoneKeyLocations" : [ {
          "containerID" : 1,
          "localID" : 109611004723200001,
          "length" : 3811,
          "offset" : 0,
          "keyOffset" : 0
        } ],
        "metadata" : { }
      } 

      Expected response - key1 should not be listed under modified marker for snapshotDiff

      Attachments

        Issue Links

          Activity

            People

              sadanand_shenoy Sadanand Shenoy
              jyosin Jyotirmoy Sinha
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: