Github user kxepal commented on a diff in the pull request:
https://github.com/apache/couchdb-fabric/pull/61#discussion_r70134929
--- Diff: src/fabric_group_info.erl ---
@@ -58,17 +58,23 @@ handle_message({rexi_EXIT, Reason}, Shard, {Counters,
Acc, Ushards}) ->
end;
handle_message({ok, Info}, Shard, {Counters0, Acc, Ushards}) ->
- NewAcc = append_result(Info, Shard, Acc, Ushards),
- Counters1 = fabric_dict:store(Shard, ok, Counters0),
- Counters = fabric_view:remove_overlapping_shards(Shard, Counters1),
- case is_complete(Counters) of
- false ->
- {ok, {Counters, NewAcc, Ushards}};
- true ->
- Pending = aggregate_pending(NewAcc),
- Infos = get_infos(NewAcc),
- Results = [{updates_pending, {Pending}} | merge_results(Infos)],
- {stop, Results}
+ case fabric_dict:lookup_element(Shard, Counters0) of
+ undefined ->
+ % already heard from other node in this range
--- End diff --
Oh, a bit complicated. Thanks for explanation! So `Counters0` here cannot
contains any else values except `nil`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---