nickva commented on code in PR #6032:
URL: https://github.com/apache/couchdb/pull/6032#discussion_r3414531611


##########
src/fabric/src/fabric_doc_update.erl:
##########
@@ -339,32 +339,38 @@ good_reply(_, _) ->
 
 -spec group_docs_by_shard(binary(), [#doc{}]) -> [{#shard{}, [#doc{}]}].
 group_docs_by_shard(DbName, Docs) ->
+    Grouped = group_docs([{Doc, mem3:shards(DbName, Id)} || #doc{id = Id} = 
Doc <- Docs]),

Review Comment:
   Hmm it's one ets lookup per doc id. But we can probably add a helper 
function to get all the shards and then do `mem3:shards(Db, DocId, Shards)` we 
have all the bits in mem3 just need to export it I think



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to