davisp commented on a change in pull request #958: [WIP] Optimize doc updates
URL: https://github.com/apache/couchdb/pull/958#discussion_r149430067
 
 

 ##########
 File path: src/couch/src/couch_db.erl
 ##########
 @@ -945,13 +945,14 @@ prep_and_validate_replicated_updates(Db, 
[Bucket|RestBuckets], [OldInfo|RestOldI
     {ok, #full_doc_info{rev_tree=OldTree}} ->
         OldLeafs = couch_key_tree:get_all_leafs_full(OldTree),
         OldLeafsLU = [{Start, RevId} || {Start, [{RevId, _}|_]} <- OldLeafs],
+        NewPaths = lists:map(fun couch_doc:to_path/1, Bucket),
+        SortedPaths = lists:sort(NewPaths),
 
 Review comment:
   Totally agree. I'm also not a fan of the stem vs full_stem differences as 
well. I'm contemplating merging the two and carrying a set of revision keys 
through the optimized O(N) version and then bailing and calling "full_stem" if 
there's a duplicate key detected. Though am a bit distracted by other deadlines 
at the moment so not devoting full thought to this.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to