25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Handle mnesia_system_event mnesia_up when other node joins this (#3842)

This commit is contained in:
Badlop 2022-11-14 17:45:41 +01:00
parent d3d50b456e
commit c6513fcfc6
2 changed files with 6 additions and 0 deletions

View File

@ -239,6 +239,9 @@ handle_cast(Msg, State) ->
handle_info({mnesia_system_event, {mnesia_down, Node}}, State) ->
clean_table_from_bad_node(Node),
{noreply, State};
handle_info({mnesia_system_event, {mnesia_up, Node}}, State) ->
?INFO_MSG("Node ~p joined our Mnesia S2S tables", [Node]),
{noreply, State};
handle_info({route, Packet}, State) ->
try route(Packet)
catch ?EX_RULE(Class, Reason, St) ->

View File

@ -125,6 +125,9 @@ handle_info({mnesia_system_event, {mnesia_down, Node}}, State) ->
mnesia:dirty_delete_object(S)
end, Sessions),
{noreply, State};
handle_info({mnesia_system_event, {mnesia_up, Node}}, State) ->
?INFO_MSG("Node ~p joined our Mnesia SM tables", [Node]),
{noreply, State};
handle_info(Info, State) ->
?WARNING_MSG("Unexpected info: ~p", [Info]),
{noreply, State}.