DorianGray / lastfs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Copy on Write

DorianGray opened this issue · comments

LastFS should implement copy on write.

Specifically, each chunk written to a mongo for a file should have a version id, and a history of versions.This id should be attached to all chunks written to the file.

When a write occurs and before the file write lock is released, the current version id attached to the file should be set to the new version id.

When reading, the highest available chunk version up to the current version should be retrieved.