From bdd612392c4ee759c95deeaccfa471983f4d3c28 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 7 May 2010 23:33:19 -0400 Subject: work on create_db functionality, can now generate fullmap for a db based on its name, its config, and current mem3 nodes - BugzID 10007 --- src/mem3.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mem3.erl') diff --git a/src/mem3.erl b/src/mem3.erl index b0105286..a95b5fb0 100644 --- a/src/mem3.erl +++ b/src/mem3.erl @@ -118,6 +118,7 @@ reset() -> %% @doc get the list of cluster nodes (according to membership module) %% This may differ from erlang:nodes() +%% Guaranteed to be in order of State's node list (1st elem in 3-tuple) nodes() -> gen_server:call(?SERVER, nodes). @@ -203,7 +204,7 @@ handle_call(reset, _From, #mem{args=Args} = State) -> %% nodes handle_call(nodes, _From, #mem{nodes=Nodes} = State) -> - {_,NodeList,_} = lists:unzip3(Nodes), + {_,NodeList,_} = lists:unzip3(lists:keysort(1, Nodes)), {reply, {ok, NodeList}, State}; %% gossip -- cgit v1.2.3