perf(mnesia): unify the copy types of all nodes
This commit is contained in:
parent
66cbedd978
commit
2a029b71c9
|
@ -65,7 +65,7 @@ mnesia(boot) ->
|
||||||
{storage_properties, [{ets, [{read_concurrency, true},
|
{storage_properties, [{ets, [{read_concurrency, true},
|
||||||
{write_concurrency, true}]}]}]);
|
{write_concurrency, true}]}]}]);
|
||||||
mnesia(copy) ->
|
mnesia(copy) ->
|
||||||
ok = ekka_mnesia:copy_table(mqtt_admin).
|
ok = ekka_mnesia:copy_table(mqtt_admin, disc_copies).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% API
|
%% API
|
||||||
|
|
|
@ -138,7 +138,7 @@ init([Env]) ->
|
||||||
{record_name, retained},
|
{record_name, retained},
|
||||||
{attributes, record_info(fields, retained)},
|
{attributes, record_info(fields, retained)},
|
||||||
{storage_properties, StoreProps}]),
|
{storage_properties, StoreProps}]),
|
||||||
ok = ekka_mnesia:copy_table(?TAB),
|
ok = ekka_mnesia:copy_table(?TAB, Copies),
|
||||||
case mnesia:table_info(?TAB, storage_type) of
|
case mnesia:table_info(?TAB, storage_type) of
|
||||||
Copies -> ok;
|
Copies -> ok;
|
||||||
_Other ->
|
_Other ->
|
||||||
|
|
|
@ -131,11 +131,11 @@ mnesia(boot) ->
|
||||||
|
|
||||||
mnesia(copy) ->
|
mnesia(copy) ->
|
||||||
%% Copy rule table
|
%% Copy rule table
|
||||||
ok = ekka_mnesia:copy_table(?RULE_TAB),
|
ok = ekka_mnesia:copy_table(?RULE_TAB, disc_copies),
|
||||||
%% Copy rule action table
|
%% Copy rule action table
|
||||||
ok = ekka_mnesia:copy_table(?ACTION_TAB),
|
ok = ekka_mnesia:copy_table(?ACTION_TAB),
|
||||||
%% Copy resource table
|
%% Copy resource table
|
||||||
ok = ekka_mnesia:copy_table(?RES_TAB),
|
ok = ekka_mnesia:copy_table(?RES_TAB, disc_copies),
|
||||||
%% Copy resource type table
|
%% Copy resource type table
|
||||||
ok = ekka_mnesia:copy_table(?RES_TYPE_TAB).
|
ok = ekka_mnesia:copy_table(?RES_TYPE_TAB).
|
||||||
|
|
||||||
|
|
|
@ -112,8 +112,8 @@ mnesia(boot) ->
|
||||||
{record_name, deactivated_alarm},
|
{record_name, deactivated_alarm},
|
||||||
{attributes, record_info(fields, deactivated_alarm)}]);
|
{attributes, record_info(fields, deactivated_alarm)}]);
|
||||||
mnesia(copy) ->
|
mnesia(copy) ->
|
||||||
ok = ekka_mnesia:copy_table(?ACTIVATED_ALARM),
|
ok = ekka_mnesia:copy_table(?ACTIVATED_ALARM, disc_copies),
|
||||||
ok = ekka_mnesia:copy_table(?DEACTIVATED_ALARM).
|
ok = ekka_mnesia:copy_table(?DEACTIVATED_ALARM, disc_copies).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% API
|
%% API
|
||||||
|
|
|
@ -62,7 +62,7 @@ mnesia(boot) ->
|
||||||
{storage_properties, [{ets, [{read_concurrency, true}]}]}]);
|
{storage_properties, [{ets, [{read_concurrency, true}]}]}]);
|
||||||
|
|
||||||
mnesia(copy) ->
|
mnesia(copy) ->
|
||||||
ok = ekka_mnesia:copy_table(?BANNED_TAB).
|
ok = ekka_mnesia:copy_table(?BANNED_TAB, disc_copies).
|
||||||
|
|
||||||
%% @doc Start the banned server.
|
%% @doc Start the banned server.
|
||||||
-spec(start_link() -> startlink_ret()).
|
-spec(start_link() -> startlink_ret()).
|
||||||
|
|
Loading…
Reference in New Issue