rnewson commented on code in PR #5371:
URL: https://github.com/apache/couchdb/pull/5371#discussion_r1910895900
##########
src/fabric/src/fabric_doc_update.erl:
##########
@@ -318,13 +337,90 @@ group_docs_by_shard(DbName, Docs) ->
)
).
-append_update_replies([], [], DocReplyDict) ->
+%% use 'lowest' node that hosts this shard range as leader
+is_leader(Worker, Workers) ->
+ Worker == lists:min([W || W <- Workers, W#shard.range ==
Worker#shard.range]).
Review Comment:
agreed
--
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]