greglook / blocks

Clojure content-addressable data storage.
The Unlicense
113 stars 6 forks source link

Store versions with blocks #9

Closed greglook closed 5 years ago

greglook commented 8 years ago

Both file-store and s3-store would benefit from keeping version information with the stored block content. We can do this under the configured root prefix because the filename (version?) isn't valid hexadecimal.

Minimally, the version should denote breaking compatibility so we can warn the user at start-time. For example, changing file-store so it stores blocks in a flat structure (e.g. root/111493dc/48a5... vs root/1114/93/dc/48a5...). A version would let the user know that the content on disk was incompatible with the current code.

Later, this also enables migrations from one version to another.

greglook commented 5 years ago

The new file-block-store in 2.0.0 has this behavior; other stores in the library are logical stores (or ephemeral) and don't suffer from this problem.