Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11911

SnapshotDiff should maintain the order of file/dir creation and deletion

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-alpha1
    • None
    • hdfs, snapshots
    • None

    Description

      DirectoryWithSnapshotFeature maintains a separate list for CREATED and DELETED children but the ordering of these creation and deletion events are not maintained. Assume a case like below, where the time is growing downwards...

      |
      +  CREATE File-1
      |
      + Snap S1 created
      |
      + DELETE File-1
      |
      + Snap S2 created
      |
      + CREATE File-1
      |
      + Snap S3 created
      |
      |
      V
      

      The snapshot diff report which takes in the DirectoryWithSnapshotFeature diff entries and just prints all the creation first and then the deletions, thereby giving the perception that file-1 got created first and then got deleted. But after S3, file-1 is still available.

      The difference between snapshot S1 and snapshot S3 under the directory /:
      M	.
      +	./file-1
      -	./file-1
      

      Can we have DirectoryWithSnapshotFeature maintain the diff entries ordered by time or sequence?

      Attachments

        Activity

          People

            manojg Manoj Govindassamy
            manojg Manoj Govindassamy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: