diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cluster_ops.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cluster_ops.erl b/src/cluster_ops.erl index c1edc5b2..72bba92f 100644 --- a/src/cluster_ops.erl +++ b/src/cluster_ops.erl @@ -59,7 +59,8 @@ key_lookup(Key, {M,F,A}, Access, Const, N) -> %% @doc Do op on all shards (and maybe even replication partners) -all_parts({M,F,A}, Access, NodeParts, ResolveFun) -> +all_parts({M,F,A}, Access, AndPartners, ResolveFun) -> + NodePartList = membership2:all_nodes_parts(AndPartners), MapFun = fun({Node, Part}) -> try rpc:call(Node, M, F, [[Part | A]]) @@ -67,9 +68,9 @@ all_parts({M,F,A}, Access, NodeParts, ResolveFun) -> {error, Class, Exception} end end, - Replies = ?PMAP(MapFun, NodeParts), + Replies = ?PMAP(MapFun, NodePartList), {Good, Bad} = lists:partition(fun valid/1, Replies), - final_all_parts(Good, Bad, length(NodeParts), ResolveFun, Access). + final_all_parts(Good, Bad, length(NodePartList), ResolveFun, Access). %% @doc Do op on some shards, depending on list of keys sent in. |