couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gonzalez <>
Subject Is the revision field deterministic?
Date Tue, 08 Apr 2014 11:00:58 GMT
Hi all,

I have just seen a very intersting issue which I do not fullly understand.
I have serverA and serverB, with the same replicated database db1.

Sometimes replication is just turned off. Currently it is off.

I have taken a look at a bunch of documents.and I have found a couple of
them where the revision field is exactly the same, but the documents
content is different. Since the content is different, that means those
documents have not been replicated, but editted indepently in serverA and

How could happen then that the revision field is the same? The only
explanation that I can find is that the rev is derived from the document
id, deterministically (together with the serial counter indicating the
number of revision). But why would the revision be generated like that? I
was under the impression that the revision was a random number (or "random
enough"), so that cases like this (independent edition of a document) could
be easily detected.

So my question is: how is the revision field generated and, more
importantly, makes my description of what is happening sense, or is there
another explanation of why the rev field is the same? (I hope I am wrong!)

Thanks and regards,
Daniel Gonzalez

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message