couchdb conflict resolution

2011-02-15 Thread Aaron Boxer
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

2011-02-15 Thread Paul J. Davis
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 boxe...@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

2011-02-15 Thread Stefan Kögl
On Tue, Feb 15, 2011 at 5:14 PM, Aaron Boxer boxe...@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

2011-02-15 Thread Aaron Boxer
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 koeglste...@gmail.com wrote:
 On Tue, Feb 15, 2011 at 5:14 PM, Aaron Boxer boxe...@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

2011-02-15 Thread Aaron Boxer
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
paul.joseph.da...@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 boxe...@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

2011-02-15 Thread Paul Davis
On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer boxe...@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

2011-02-15 Thread Aaron Boxer
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 paul.joseph.da...@gmail.com wrote:
 On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer boxe...@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

2011-02-15 Thread Paul Davis
On Tue, Feb 15, 2011 at 3:45 PM, Aaron Boxer boxe...@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 paul.joseph.da...@gmail.com 
 wrote:
 On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer boxe...@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

2011-02-15 Thread Aaron Boxer
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 paul.joseph.da...@gmail.com wrote:
 On Tue, Feb 15, 2011 at 3:45 PM, Aaron Boxer boxe...@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 paul.joseph.da...@gmail.com 
 wrote:
 On Tue, Feb 15, 2011 at 3:11 PM, Aaron Boxer boxe...@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.