diff --git a/apps/emqx/src/emqx_router.erl b/apps/emqx/src/emqx_router.erl index ad63c6657..3337b57c8 100644 --- a/apps/emqx/src/emqx_router.erl +++ b/apps/emqx/src/emqx_router.erl @@ -273,7 +273,7 @@ trans(Fun, Args) -> {WPid, RefMon} = spawn_monitor( %% NOTE: this is under the assumption that crashes in Fun - %% are caught by mnesia:transaction/2. + %% are caught by mria:transaction/2. %% Future changes should keep in mind that this process %% always exit with database write result. fun() -> diff --git a/apps/emqx/test/emqx_trie_SUITE.erl b/apps/emqx/test/emqx_trie_SUITE.erl index 9135a45dc..00d64877c 100644 --- a/apps/emqx/test/emqx_trie_SUITE.erl +++ b/apps/emqx/test/emqx_trie_SUITE.erl @@ -188,6 +188,6 @@ t_delete3(_) -> clear_tables() -> emqx_trie:clear_tables(). trans(Fun) -> - mnesia:transaction(Fun). + mria:transaction(?ROUTE_SHARD, Fun). trans(Fun, Args) -> - mnesia:transaction(Fun, Args). + mria:transaction(?ROUTE_SHARD, Fun, Args). diff --git a/apps/emqx_authz/test/emqx_authz_mnesia_SUITE.erl b/apps/emqx_authz/test/emqx_authz_mnesia_SUITE.erl index ed82e9b1d..f2562becc 100644 --- a/apps/emqx_authz/test/emqx_authz_mnesia_SUITE.erl +++ b/apps/emqx_authz/test/emqx_authz_mnesia_SUITE.erl @@ -54,19 +54,19 @@ end_per_suite(_Config) -> ok. init_per_testcase(t_authz, Config) -> - mnesia:transaction(fun mria:dirty_write/1, [#emqx_acl{who = {?ACL_TABLE_USERNAME, <<"test_username">>}, - rules = [{allow, publish, <<"test/%u">>}, - {allow, subscribe, <<"eq #">>} - ] - }]), - mnesia:transaction(fun mria:dirty_write/1, [#emqx_acl{who = {?ACL_TABLE_CLIENTID, <<"test_clientid">>}, - rules = [{allow, publish, <<"test/%c">>}, - {deny, subscribe, <<"eq #">>} - ] - }]), - mnesia:transaction(fun mria:dirty_write/1, [#emqx_acl{who = ?ACL_TABLE_ALL, - rules = [{deny, all, <<"#">>}] - }]), + mria:dirty_write(#emqx_acl{who = {?ACL_TABLE_USERNAME, <<"test_username">>}, + rules = [{allow, publish, <<"test/%u">>}, + {allow, subscribe, <<"eq #">>} + ] + }), + mria:dirty_write(#emqx_acl{who = {?ACL_TABLE_CLIENTID, <<"test_clientid">>}, + rules = [{allow, publish, <<"test/%c">>}, + {deny, subscribe, <<"eq #">>} + ] + }), + mria:dirty_write(#emqx_acl{who = ?ACL_TABLE_ALL, + rules = [{deny, all, <<"#">>}] + }), Config; init_per_testcase(_, Config) -> Config. diff --git a/apps/emqx_modules/src/emqx_telemetry.erl b/apps/emqx_modules/src/emqx_telemetry.erl index f9903b845..17f32ee58 100644 --- a/apps/emqx_modules/src/emqx_telemetry.erl +++ b/apps/emqx_modules/src/emqx_telemetry.erl @@ -127,7 +127,7 @@ get_telemetry() -> %% gen_server callbacks %%-------------------------------------------------------------------- -%% This is to suppress dialyzer warnings for mnesia:dirty_write and +%% This is to suppress dialyzer warnings for mria:dirty_write and %% dirty_read race condition. Given that the init function is not evaluated %% concurrently in one node, it should be free of race condition. %% Given the chance of having two nodes bootstraping with the write