mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Avoid cleanup on bag when disc_only, switch in memory (#1161)
This commit is contained in:
parent
c91c5aa352
commit
b2f53fb962
@ -52,7 +52,10 @@ remove_room(_LServer, LName, LHost) ->
|
|||||||
remove_user(LName, LHost).
|
remove_user(LName, LHost).
|
||||||
|
|
||||||
delete_old_messages(global, TimeStamp, Type) ->
|
delete_old_messages(global, TimeStamp, Type) ->
|
||||||
delete_old_user_messages(mnesia:dirty_first(archive_msg), TimeStamp, Type).
|
mnesia:change_table_copy_type(archive_msg, node(), disc_copies),
|
||||||
|
Result = delete_old_user_messages(mnesia:dirty_first(archive_msg), TimeStamp, Type),
|
||||||
|
mnesia:change_table_copy_type(archive_msg, node(), disc_only_copies),
|
||||||
|
Result.
|
||||||
|
|
||||||
delete_old_user_messages('$end_of_table', _TimeStamp, _Type) ->
|
delete_old_user_messages('$end_of_table', _TimeStamp, _Type) ->
|
||||||
ok;
|
ok;
|
||||||
|
Loading…
Reference in New Issue
Block a user