fix(http-api): using a fixed order when cluster query nodes

This commit is contained in:
Shawn 2023-02-07 16:18:59 +08:00
parent 90d6e16707
commit 5b518eedb8
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ cluster_query(Params, {Tab, QsSchema}, QueryFun) ->
Start = if Page > 1 -> (Page-1) * Limit; Start = if Page > 1 -> (Page-1) * Limit;
true -> 0 true -> 0
end, end,
Nodes = ekka_mnesia:running_nodes(), Nodes = lists:sort(ekka_mnesia:running_nodes()),
Rows = do_cluster_query(Nodes, Qs, QueryFun, Start, Limit+1, []), Rows = do_cluster_query(Nodes, Qs, QueryFun, Start, Limit+1, []),
Meta = #{page => Page, limit => Limit}, Meta = #{page => Page, limit => Limit},
NMeta = case CodCnt =:= 0 of NMeta = case CodCnt =:= 0 of