24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-06 23:22:36 +02:00

Make chat room destroy and create being sync_dirty to limit mnesia overload. (thanks to Mickael Remond)

This commit is contained in:
Christophe Romain 2010-07-13 21:48:36 +02:00
parent cc1839a250
commit d0b7cd599b

View File

@ -306,7 +306,7 @@ handle_info({room_destroyed, RoomHost, Pid}, State) ->
mnesia:delete_object(#muc_online_room{name_host = RoomHost, mnesia:delete_object(#muc_online_room{name_host = RoomHost,
pid = Pid}) pid = Pid})
end, end,
mnesia:async_dirty(F), mnesia:sync_dirty(F),
{noreply, State}; {noreply, State};
handle_info(_Info, State) -> handle_info(_Info, State) ->
{noreply, State}. {noreply, State}.
@ -603,7 +603,7 @@ register_room(Host, Room, Pid) ->
mnesia:write(#muc_online_room{name_host = {Room, Host}, mnesia:write(#muc_online_room{name_host = {Room, Host},
pid = Pid}) pid = Pid})
end, end,
mnesia:async_dirty(F). mnesia:sync_dirty(F).
iq_disco_info(Lang) -> iq_disco_info(Lang) ->
[{xmlelement, "identity", [{xmlelement, "identity",