diff options
Diffstat (limited to 'src/fabric/src/fabric_util.erl')
-rw-r--r-- | src/fabric/src/fabric_util.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fabric/src/fabric_util.erl b/src/fabric/src/fabric_util.erl index aaf0623f0..8aa14e73a 100644 --- a/src/fabric/src/fabric_util.erl +++ b/src/fabric/src/fabric_util.erl @@ -14,7 +14,7 @@ -export([submit_jobs/3, submit_jobs/4, cleanup/1, recv/4, get_db/1, get_db/2, error_info/1, update_counter/3, remove_ancestors/2, create_monitors/1, kv/2, - remove_down_workers/2, doc_id_and_rev/1]). + remove_down_workers/2, remove_down_workers/3, doc_id_and_rev/1]). -export([request_timeout/0, attachments_timeout/0, all_docs_timeout/0, view_timeout/1]). -export([log_timeout/2, remove_done_workers/2]). -export([is_users_db/1, is_replicator_db/1]). @@ -33,9 +33,12 @@ -include_lib("eunit/include/eunit.hrl"). remove_down_workers(Workers, BadNode) -> + remove_down_workers(Workers, BadNode, []). + +remove_down_workers(Workers, BadNode, RingOpts) -> Filter = fun(#shard{node = Node}, _) -> Node =/= BadNode end, NewWorkers = fabric_dict:filter(Filter, Workers), - case fabric_ring:is_progress_possible(NewWorkers) of + case fabric_ring:is_progress_possible(NewWorkers, RingOpts) of true -> {ok, NewWorkers}; false -> |