eiri commented on issue #592: MRView's seq btree needs custom sorter function.
URL: https://github.com/apache/couchdb/issues/592#issuecomment-409646315
 
 
   @AlexanderKaraberov Ah, this happened before of my time, so it took a bit of 
digging through the old commits to see what's going on here.
   
   Yes, this is an intentional change and it was done to address [this 
bug](https://issues.apache.org/jira/browse/COUCHDB-1415). Short version is that 
the previous version of `merge_rev_trees` relied on equality of the old rev 
tree and the merged rev tree in order to know when the update is a document 
recreation. If body of the deleted document been compacted away then at 
recreation you've been getting into situation when the old rev tree and the new 
rev tree different in content but identical in structure.
   
   To address that `merge_rev_trees` was essentially rewritten completely in 
[this 
commit](https://github.com/apache/couchdb/commit/39df1d5e78a3ffd855cc9c2a6aa257237d4444da).
 So now when you are trying to recreate with `rev` you are ending up in [this 
codepath](https://github.com/apache/couchdb/blob/master/src/couch/src/couch_db_updater.erl#L589),
 because your rev's depth bigger than 1.
   
   This is all a bit esoteric, so I hope it makes sense to you.   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to