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: # curl http://127.0.0.1:5984/ {"couchdb":"Welcome","uuid":"f2b1fdee5c482a9e273d062572369c5d","version":"1.6.1","vendor":{"version":"1.6.1-1","name":"Homebrew"}} # curl -X PUT http://127.0.0.1:5984/db1 {"ok":true} # curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:5984/db1/doc1 -d '{"foo":"bar"}' {"ok":true,"id":"doc1","rev":"1-4c6114c65e295552ab1019e2b046b10e"} # curl -X GET http://127.0.0.1:5984/db1/doc1 {"_id":"doc1","_rev":"1-4c6114c65e295552ab1019e2b046b10e","foo":"bar"} (this is consistent on multiple different machines) And this is LiteServ Community Edition: # curl http://127.0.0.1:59840/ {"vendor":{"name":"Couchbase Lite (Objective-C)","version":"1.0.2 (build 7)"},"couchdb":"Welcome","CouchbaseLite":"Welcome","version":"1 # curl -X PUT http://127.0.0.1:59840/db1 {"ok":true} # curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:59840/db1/doc1 -d '{"foo":"bar"}' {"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 -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/7f963138-823f-41a0-80cc-aa8e33c20391%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
