> On Oct 13, 2014, at 12:22 PM, Igor Ievsiukov <[email protected]> wrote: > > I've noticed that having the same doc _id and content, Apache CouchDB and > CouchBase Lite are generating different revision hashes.
This is true, but it's not really a problem. > a) revision is a MD5 of a document and its' attachments; which are identical > here It's actually generated from the parent rev ID, the 'deleted' flag, and the JSON. But there are a lot of different ways to encode this information before generating an MD5, and CBL and CouchDB don't do it identically. In particular, (if I recall correctly) CouchDB doesn't digest the JSON but rather the serialized Erlang term that represents it; that's something CBL couldn't practically reproduce, so I didn't even try. > b) replication will be messed up: we will have a conflict where it shouldn't > be This only happens in the case where two clients (one CBL, one CouchDB) make the exact same change to the same parent revision. The revisions they create will have identical contents but different revision IDs. This will be a conflict but one that's trivial to resolve. Note that one of those two revisions has to be created by CouchDB itself, i.e. by a direct PUT to CouchDB's REST API, not just using CouchDB as a replication server. —Jens -- 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/FE331D91-FE43-49BC-B743-AD1C8812006B%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
