halfer/Meshing — Issue #35: Consider including previous hash in current hash function
Author: halfer
Created: 2011-11-10 00:21:21+00:00
State: open
Labels: low-priority

Having read up a bit on CouchDB, it seems that the versioning approach they use is to hash the contents of the record (document) together with the hash of the previous version known to that node. This ensures that two records that have taken two different version paths but are finally equal will still have two different hashes (document identifiers).

This will require some thought - the focus in Meshing is in current values, with versions being kept for rollback purposes, rather than because the history is important in its own right. My initial design work has generally had it mind that if a record is corrected manually on one node to be the same as it is on another node, they can be considered to be the same record. We can still have a hash of hashes (for a large version history) or a list of hashes (for a small history) in order to replicate various histories for a row across nodes.