You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Aaron Boxer <bo...@gmail.com> on 2011/02/15 16:14:21 UTC

couchdb conflict resolution

Hello,

I am very interested in understanding how conflict resolution works in couchdb:

Is there a technical overview, somewhere, of how a node decides which
revision wins?
After a conflict is resolved, are old revisions discarded?

Any technical details, short of slogging through the code, would be
very welcome.

Thanks,
Aaron

Re: couchdb conflict resolution

Posted by Aaron Boxer <bo...@gmail.com>.
ahhh, ok. So key tree is used to detect conflict, and to reference different
conflicted versions. Got it, thanks.



On Tue, Feb 15, 2011 at 3:50 PM, Paul Davis <pa...@gmail.com> wrote:
> On Tue, Feb 15, 2011 at 3:45 PM, Aaron Boxer <bo...@gmail.com> wrote:
>> Thanks. So, if I learn me some Erlang and read couch_key_tree.erl,
>> I will understand how merging is done?
>>
>
> There is no merging. Conflicts are resolved by deleting one of the
> conflicted revisions. This being a major departure from the Git model.
>
>> Also, where is the code for generating a version id?
>>
>
> couch_db:new_revid/1
>
>> appreciate the help,
>> Aaron
>>
>>
>>
>> On Tue, Feb 15, 2011 at 3:33 PM, Paul Davis <pa...@gmail.com> wrote:
>>> On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer <bo...@gmail.com> wrote:
>>>> Thanks, Paul!  This is exactly the level of detail and granularity I
>>>> am looking for.
>>>>
>>>> GIT is mentioned a few times in this issue write-up. So, does couch now use
>>>> a modified form of GIT revision tracking?
>>>>
>>>
>>> Its similar in theory but you'd be a bit hard pressed to pick that out
>>> without an pretty good understanding of both. Its merely just a
>>> reference that they both use a form of inverted-merkle tree, but
>>> beyond that the similarities are generally thin.
>>>
>>
>

Re: couchdb conflict resolution

Posted by Paul Davis <pa...@gmail.com>.
On Tue, Feb 15, 2011 at 3:45 PM, Aaron Boxer <bo...@gmail.com> wrote:
> Thanks. So, if I learn me some Erlang and read couch_key_tree.erl,
> I will understand how merging is done?
>

There is no merging. Conflicts are resolved by deleting one of the
conflicted revisions. This being a major departure from the Git model.

> Also, where is the code for generating a version id?
>

couch_db:new_revid/1

> appreciate the help,
> Aaron
>
>
>
> On Tue, Feb 15, 2011 at 3:33 PM, Paul Davis <pa...@gmail.com> wrote:
>> On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer <bo...@gmail.com> wrote:
>>> Thanks, Paul!  This is exactly the level of detail and granularity I
>>> am looking for.
>>>
>>> GIT is mentioned a few times in this issue write-up. So, does couch now use
>>> a modified form of GIT revision tracking?
>>>
>>
>> Its similar in theory but you'd be a bit hard pressed to pick that out
>> without an pretty good understanding of both. Its merely just a
>> reference that they both use a form of inverted-merkle tree, but
>> beyond that the similarities are generally thin.
>>
>

Re: couchdb conflict resolution

Posted by Aaron Boxer <bo...@gmail.com>.
Thanks. So, if I learn me some Erlang and read couch_key_tree.erl,
I will understand how merging is done?

Also, where is the code for generating a version id?

appreciate the help,
Aaron



On Tue, Feb 15, 2011 at 3:33 PM, Paul Davis <pa...@gmail.com> wrote:
> On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer <bo...@gmail.com> wrote:
>> Thanks, Paul!  This is exactly the level of detail and granularity I
>> am looking for.
>>
>> GIT is mentioned a few times in this issue write-up. So, does couch now use
>> a modified form of GIT revision tracking?
>>
>
> Its similar in theory but you'd be a bit hard pressed to pick that out
> without an pretty good understanding of both. Its merely just a
> reference that they both use a form of inverted-merkle tree, but
> beyond that the similarities are generally thin.
>

Re: couchdb conflict resolution

Posted by Paul Davis <pa...@gmail.com>.
On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer <bo...@gmail.com> wrote:
> Thanks, Paul!  This is exactly the level of detail and granularity I
> am looking for.
>
> GIT is mentioned a few times in this issue write-up. So, does couch now use
> a modified form of GIT revision tracking?
>

Its similar in theory but you'd be a bit hard pressed to pick that out
without an pretty good understanding of both. Its merely just a
reference that they both use a form of inverted-merkle tree, but
beyond that the similarities are generally thin.

Re: couchdb conflict resolution

Posted by Aaron Boxer <bo...@gmail.com>.
Thanks, Paul!  This is exactly the level of detail and granularity I
am looking for.

GIT is mentioned a few times in this issue write-up. So, does couch now use
a modified form of GIT revision tracking?



On Tue, Feb 15, 2011 at 12:11 PM, Paul J. Davis
<pa...@gmail.com> wrote:
> Here is some high level text on it.
>
> https://issues.apache.org/jira/browse/COUCHDB-988
>
> On Feb 15, 2011, at 10:14 AM, Aaron Boxer <bo...@gmail.com> wrote:
>
>> Hello,
>>
>> I am very interested in understanding how conflict resolution works in couchdb:
>>
>> Is there a technical overview, somewhere, of how a node decides which
>> revision wins?
>> After a conflict is resolved, are old revisions discarded?
>>
>> Any technical details, short of slogging through the code, would be
>> very welcome.
>>
>> Thanks,
>> Aaron
>

Re: couchdb conflict resolution

Posted by "Paul J. Davis" <pa...@gmail.com>.
Here is some high level text on it. 

https://issues.apache.org/jira/browse/COUCHDB-988

On Feb 15, 2011, at 10:14 AM, Aaron Boxer <bo...@gmail.com> wrote:

> Hello,
> 
> I am very interested in understanding how conflict resolution works in couchdb:
> 
> Is there a technical overview, somewhere, of how a node decides which
> revision wins?
> After a conflict is resolved, are old revisions discarded?
> 
> Any technical details, short of slogging through the code, would be
> very welcome.
> 
> Thanks,
> Aaron

Re: couchdb conflict resolution

Posted by Aaron Boxer <bo...@gmail.com>.
Thanks, Stefan!  I did see this already. Good for a high level view;
but I am looking
for the gory details.

Cheers,
Aaron

On Tue, Feb 15, 2011 at 2:18 PM, Stefan Kögl <ko...@gmail.com> wrote:
> On Tue, Feb 15, 2011 at 5:14 PM, Aaron Boxer <bo...@gmail.com> wrote:
>> I am very interested in understanding how conflict resolution works in couchdb:
>>
>> Is there a technical overview, somewhere, of how a node decides which
>> revision wins?
>> After a conflict is resolved, are old revisions discarded?
>>
>> Any technical details, short of slogging through the code, would be
>> very welcome.
>
> I'm not sure if this is the right level of detail for your purposes, but I found
>
>  http://guide.couchdb.org/draft/conflicts.html
>
> very interesting.
>
> -- Stefan
>

Re: couchdb conflict resolution

Posted by Stefan Kögl <ko...@gmail.com>.
On Tue, Feb 15, 2011 at 5:14 PM, Aaron Boxer <bo...@gmail.com> wrote:
> I am very interested in understanding how conflict resolution works in couchdb:
>
> Is there a technical overview, somewhere, of how a node decides which
> revision wins?
> After a conflict is resolved, are old revisions discarded?
>
> Any technical details, short of slogging through the code, would be
> very welcome.

I'm not sure if this is the right level of detail for your purposes, but I found

 http://guide.couchdb.org/draft/conflicts.html

very interesting.

-- Stefan