I partly explained this some time ago on this ML. I'll c&p it quickly and hope 
it helps

> consider the _rev token as an opaque value necessary for the mvcc (I'd call 
> it mvcc-token, since "revision" is often misunderstood). The hash algorithm 
> may even change someday. AFAIK it contains the document itself and also its 
> history (at least parts of it). The algorithm ensures that the same document 
> with the same history result in the same _rev token even on two different 
> nodes. This behavior is required for conflict detection/resolution.

Best

Sebastian

On 05.10.2010, at 04:19, Robert Sosinski wrote:

> Hello,
> 
> I just wanted to ask how CouchDB generates the string used for the
> _rev.  The first part (being the number) is pretty self explanatory.
> However, I have not yet figured out how the second part that looks
> like a MD5 digest is created.  Would it be possible to
> deterministically predict the _rev "digest" before saving the
> document?
> 
> Any clarification would help.
> 
> Thanks,
> 
> -Robert

Reply via email to