couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: interested in learning about replication algorithm
Date Tue, 15 Feb 2011 22:48:02 GMT
It's worth mentioning that, like git, the hash also includes the
previous contents (and, hence, is dependent on all previous updates),

Only identical sequences of updates will yield the same _rev.

B.

On 15 February 2011 22:37, Randall Leeds <randall.leeds@gmail.com> wrote:
> On Tue, Feb 15, 2011 at 07:30, Aaron Boxer <boxerab@gmail.com> wrote:
>> Interesting. Thanks!
>>
>> How do version ids get generated?  How do the different nodes
>> avoid version id collision; i.e. two nodes updating a document with the
>> same version id?
>
> The revision id contains both a monotonically increasing number
> revision number and a hash of the document contents. The hash breaks
> ties (storing the conflict, not resolving it, but deterministically
> choosing a privileged version to report as the "newest").
>
> In this manner, should two nodes perform the same update the revision
> is said to exist in both places already and replication will note this
> and not copy the document again.
>
> -Randall
>

Mime
View raw message