Hi everyone,
I've noticed that having the same doc _id and content, Apache CouchDB and CouchBase Lite are generating different revision hashes.
For example, freshly installed CouchDB 1.6.1 from Homebrew:
{"couchdb":"Welcome","uuid":"f2b1fdee5c482a9e273d062572369c5d","version":"1.6.1","vendor":{"version":"1.6.1-1","name":"Homebrew"}}
{"ok":true}
{"ok":true,"id":"doc1","rev":"1-4c6114c65e295552ab1019e2b046b10e"}
{"_id":"doc1","_rev":"1-4c6114c65e295552ab1019e2b046b10e","foo":"bar"}
(this is consistent on multiple different machines)
And this is LiteServ Community Edition:
{"vendor":{"name":"Couchbase Lite (Objective-C)","version":"1.0.2 (build 7)"},"couchdb":"Welcome","CouchbaseLite":"Welcome","version":"1
{"ok":true}
{"id":"doc1","rev":"1-aaa6c063924b64a141c98820efcc0022","ok":true}
(same valid for mobile version, consistent between iOS and Android)
As you can see, for the document with exactly the same _id and content, CouchDB generated "1-4c6114c65e295552ab1019e2b046b10e" and CBL has generated "1-aaa6c063924b64a141c98820efcc0022". Now, correct me if I'm wrong, but from my understanding, in this case, revision hashes must match, because:
a) revision is a MD5 of a document and its' attachments; which are identical here
b) replication will be messed up: we will have a conflict where it shouldn't be
Am I missing something here or having different revision hashes is normal for different implementations?
Many thanks in advance,
Igor