Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-9431

[snapshot] Referenced and exclusive size not populated properly when snapshot is created after Trash deletion

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Snapshot

    Description

      Steps :

      1. Create vol/buck/key
      2. Create snapshot snap1
      3. Delete key - moved inside .Trash
      4. Create snapshot snap2
      5. Delete .Trash of above bucket
      6. Create snapshot snap3
      7. Delete snapshot snap2
      8. Check referenced and exclusive size of snapshots

      Expected behaviour - Referenced size of snapshot snap3 should be 0, since it holds no keys. Exclusive size of snap1 should be equal to key size since its the only snapshot that holds the key.

      Observed behaviour - Referenced size of snapshot snap3 == snap1. Exclusive size of snapshot snap1 = 0

      Snapshot file contents -

      # ozone fs -ls -R ofs://ozone1/vol2/buck2/.snapshot
      drwxrwxrwx   - om om        668 2023-10-11 07:21 ofs://ozone1/vol2/buck2/.snapshot/snap1
      -rw-rw-rw-   3 om om        668 2023-10-11 07:20 ofs://ozone1/vol2/buck2/.snapshot/snap1/key1
      drwxrwxrwx   - om om        668 2023-10-11 07:23 ofs://ozone1/vol2/buck2/.snapshot/snap3 

      Snapshot info -

      # ozone sh snapshot ls vol2/buck2
      [ {
        "volumeName" : "vol2",
        "bucketName" : "buck2",
        "name" : "snap1",
        "creationTime" : 1697008874359,
        "snapshotStatus" : "SNAPSHOT_ACTIVE",
        "snapshotId" : "5ad6b758-d293-498d-9fdc-a5697853da65",
        "snapshotPath" : "vol2/buck2",
        "checkpointDir" : "-5ad6b758-d293-498d-9fdc-a5697853da65",
        "referencedSize" : 668,
        "referencedReplicatedSize" : 2004,
        "exclusiveSize" : 0,
        "exclusiveReplicatedSize" : 0
      }, {
        "volumeName" : "vol2",
        "bucketName" : "buck2",
        "name" : "snap3",
        "creationTime" : 1697009036987,
        "snapshotStatus" : "SNAPSHOT_ACTIVE",
        "snapshotId" : "b9521b9c-0f6d-4208-993c-af66caf90c7b",
        "snapshotPath" : "vol2/buck2",
        "checkpointDir" : "-b9521b9c-0f6d-4208-993c-af66caf90c7b",
        "referencedSize" : 668,
        "referencedReplicatedSize" : 2004,
        "exclusiveSize" : 0,
        "exclusiveReplicatedSize" : 0
      } ] 

      Attachments

        Activity

          People

            aswinshakil Aswin Shakil
            jyosin Jyotirmoy Sinha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: