Skip to content

Instantly share code, notes, and snippets.

@moonpolysoft
Created March 23, 2009 17:28
Show Gist options
  • Save moonpolysoft/83673 to your computer and use it in GitHub Desktop.
Save moonpolysoft/83673 to your computer and use it in GitHub Desktop.
diff --git a/elibs/membership.erl b/elibs/membership.erl
index a68d8df..516c7eb 100644
--- a/elibs/membership.erl
+++ b/elibs/membership.erl
@@ -171,13 +171,10 @@ handle_call({nodes_for_partition, Partition}, _From, State) ->
handle_call({servers_for_key, Key}, From, State) ->
Config = configuration:get_config(),
- spawn_link(fun() ->
- Nodes = int_nodes_for_key(Key, State, Config),
- Part = int_partition_for_key(Key, State, Config),
- MapFun = fun(Node) -> {list_to_atom(lists:concat([storage_, Part])), Node} end,
- gen_server:reply(From, lists:map(MapFun, Nodes))
- end),
- {noreply, State};
+ Nodes = int_nodes_for_key(Key, State, Config),
+ Part = int_partition_for_key(Key, State, Config),
+ MapFun = fun(Node) -> {list_to_atom(lists:concat([storage_, Part])), Node} end,
+ {reply, lists:map(MapFun, Nodes), State};
handle_call({nodes_for_key, Key}, _From, State) ->
{reply, int_nodes_for_key(Key, State, configuration:get_config()), State};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment