Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Snapshot (HDFS-2802)
-
None
-
Reviewed
Description
In our first snapshot implementation, snapshot creation runs in O(N) and occupies O(N) memory space, where N = # files + # directories + # symlinks in the snapshot. The advantages of the implementation are that there is no additional cost for the modifications after snapshots are created, and it leads to a simple implementation.
In this JIRA, we optimize snapshot creation to O(1) although it introduces additional cost in the modifications after snapshots are created. Note that the INode is given as an assumption, otherwise, there is a non-constant cost to find the INode.