nickva commented on code in PR #5371:
URL: https://github.com/apache/couchdb/pull/5371#discussion_r2899237489
##########
src/fabric/src/fabric_doc_update.erl:
##########
@@ -536,6 +622,25 @@ doc_update3() ->
?assertEqual({ok, [{Doc1, {ok, Doc1}}, {Doc2, {ok, Doc2}}]}, Reply).
+early_termination_on_conflict() ->
Review Comment:
Wonder if it's worth trying a few more test cases like if we use w=1,
w=3(w=n) and we get a conflict at various times (first worker, or first worker
succeeds and second get a conflict). Then maybe a few mixes of conflict
response and maintenance mode responses.
##########
src/fabric/src/fabric_doc_update.erl:
##########
@@ -47,10 +48,13 @@ go(DbName, AllDocs0, Opts) ->
doc_count = length(AllDocs),
w = fabric_util:w_from_opts(DbName, Options),
grouped_docs = GroupedDocs,
- reply = dict:new()
+ reply = dict:new(),
+ dbname = DbName,
+ update_options = Options
},
Timeout = fabric_util:request_timeout(),
- try rexi_utils:recv(Workers, #shard.ref, fun handle_message/3, Acc0,
infinity, Timeout) of
+ Acc1 = start_workers(Acc0),
Review Comment:
If we see a large enough perf impact from the new strategy, wonder if this
could be a good place add a config start all workers vs just start just one per
range.
--
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]