perf(router): add route runs in async dirty context

This commit is contained in:
William Yang 2021-04-19 14:37:40 +02:00 committed by Zaiming (Stone) Shi
parent cee378c345
commit ebc1b8521b
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ delete_trie_route(Route = #route{topic = Topic}) ->
%% @private %% @private
-spec(trans(function(), list(any())) -> ok | {error, term()}). -spec(trans(function(), list(any())) -> ok | {error, term()}).
trans(Fun, Args) -> trans(Fun, Args) ->
mnesia:sync_dirty(Fun, Args). mnesia:async_dirty(Fun, Args).
lock_router() -> lock_router() ->
%% if Retry is not 0, global:set_lock could sleep a random time up to 8s. %% if Retry is not 0, global:set_lock could sleep a random time up to 8s.