chore(mria): ekka_rlog -> mria_rlog
This commit is contained in:
parent
3e8b9ff76a
commit
1a473bb73b
|
@ -57,7 +57,7 @@ stop(_State) -> ok.
|
|||
|
||||
ensure_ekka_started() ->
|
||||
ekka:start(),
|
||||
ok = ekka_rlog:wait_for_shards(?BOOT_SHARDS, infinity).
|
||||
ok = mria_rlog:wait_for_shards(?BOOT_SHARDS, infinity).
|
||||
|
||||
%% @doc Call this function to make emqx boot without loading config,
|
||||
%% in case we want to delegate the config load to a higher level app
|
||||
|
|
|
@ -108,7 +108,7 @@ init([]) ->
|
|||
{attributes, record_info(fields, channel)},
|
||||
{storage_properties, [{ets, [{read_concurrency, true},
|
||||
{write_concurrency, true}]}]}]),
|
||||
ok = ekka_rlog:wait_for_shards([?CM_SHARD], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?CM_SHARD], infinity),
|
||||
ok = ekka:monitor(membership),
|
||||
{ok, #{}}.
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ maybe_trans(Fun, Args) ->
|
|||
trans(Fun, Args);
|
||||
global ->
|
||||
%% Assert:
|
||||
mnesia = ekka_rlog:backend(), %% TODO: do something smarter than just crash
|
||||
mnesia = mria_rlog:backend(), %% TODO: do something smarter than just crash
|
||||
lock_router(),
|
||||
try mnesia:sync_dirty(Fun, Args)
|
||||
after
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
%%------------------------------------------------------------------------------
|
||||
|
||||
start(_StartType, _StartArgs) ->
|
||||
ok = ekka_rlog:wait_for_shards([?AUTH_SHARD], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?AUTH_SHARD], infinity),
|
||||
{ok, Sup} = emqx_authn_sup:start_link(),
|
||||
ok = ?AUTHN:register_providers(providers()),
|
||||
ok = initialize(),
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
-export([start/2, stop/1]).
|
||||
|
||||
start(_StartType, _StartArgs) ->
|
||||
ok = ekka_rlog:wait_for_shards([?ACL_SHARDED], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?ACL_SHARDED], infinity),
|
||||
{ok, Sup} = emqx_authz_sup:start_link(),
|
||||
ok = emqx_authz:init(),
|
||||
{ok, Sup}.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
start(_StartType, _StartArgs) ->
|
||||
{ok, Sup} = emqx_dashboard_sup:start_link(),
|
||||
ok = ekka_rlog:wait_for_shards([?DASHBOARD_SHARD], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?DASHBOARD_SHARD], infinity),
|
||||
_ = emqx_dashboard:start_listeners(),
|
||||
emqx_dashboard_cli:load(),
|
||||
ok = emqx_dashboard_admin:add_default_user(),
|
||||
|
|
|
@ -146,7 +146,7 @@ init([InstaId, PredefTopics]) ->
|
|||
]),
|
||||
ok = mria:wait_for_tables([Tab]),
|
||||
% FIXME:
|
||||
%ok = ekka_rlog:wait_for_shards([?CM_SHARD], infinity),
|
||||
%ok = mria_rlog:wait_for_shards([?CM_SHARD], infinity),
|
||||
MaxPredefId = lists:foldl(
|
||||
fun(#{id := TopicId, topic := TopicName0}, AccId) ->
|
||||
TopicName = iolist_to_binary(TopicName0),
|
||||
|
|
|
@ -84,7 +84,7 @@ multicall(M, F, A, RequireNum, Timeout) when RequireNum =:= all orelse RequireNu
|
|||
MFA = {initiate, {M, F, A}},
|
||||
Begin = erlang:monotonic_time(),
|
||||
InitRes =
|
||||
case ekka_rlog:role() of
|
||||
case mria_rlog:role() of
|
||||
core -> gen_server:call(?MODULE, MFA, Timeout);
|
||||
replicant ->
|
||||
%% the initiate transaction must happened on core node
|
||||
|
|
|
@ -36,7 +36,7 @@ start() ->
|
|||
ok = print_otp_version_warning(),
|
||||
ok = load_config_files(),
|
||||
ekka:start(),
|
||||
ekka_rlog:wait_for_shards([?EMQX_MACHINE_SHARD], infinity),
|
||||
mria_rlog:wait_for_shards([?EMQX_MACHINE_SHARD], infinity),
|
||||
ok.
|
||||
|
||||
graceful_shutdown() ->
|
||||
|
|
|
@ -43,7 +43,7 @@ init_per_suite(Config) ->
|
|||
application:load(emqx),
|
||||
application:load(emqx_machine),
|
||||
ok = ekka:start(),
|
||||
ok = ekka_rlog:wait_for_shards([?EMQX_MACHINE_SHARD], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?EMQX_MACHINE_SHARD], infinity),
|
||||
application:set_env(emqx_machine, cluster_call_max_history, 100),
|
||||
application:set_env(emqx_machine, cluster_call_clean_interval, 1000),
|
||||
application:set_env(emqx_machine, cluster_call_retry_interval, 900),
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
start(_Type, _Args) ->
|
||||
{ok, Sup} = emqx_mgmt_sup:start_link(),
|
||||
ok = ekka_rlog:wait_for_shards([?MANAGEMENT_SHARD], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?MANAGEMENT_SHARD], infinity),
|
||||
emqx_mgmt_cli:load(),
|
||||
{ok, Sup}.
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ create_resource(#{storage_type := StorageType}) ->
|
|||
{record_name, retained},
|
||||
{attributes, record_info(fields, retained)},
|
||||
{storage_properties, StoreProps}]),
|
||||
ok = ekka_rlog:wait_for_shards([?RETAINER_SHARD], infinity),
|
||||
ok = mria_rlog:wait_for_shards([?RETAINER_SHARD], infinity),
|
||||
case mnesia:table_info(?TAB, storage_type) of
|
||||
Copies -> ok;
|
||||
_Other ->
|
||||
|
|
Loading…
Reference in New Issue