refactor(emqx): Use emqx_ds_backends application

This commit is contained in:
ieQu1 2024-06-13 15:46:38 +02:00
parent ef09cfcd71
commit a0fbd37e58
No known key found for this signature in database
GPG Key ID: 488654DF3FED6FDE
4 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@
sasl, sasl,
lc, lc,
hocon, hocon,
emqx_durable_storage, emqx_ds_backends,
bcrypt, bcrypt,
pbkdf2, pbkdf2,
emqx_http_lib, emqx_http_lib,

View File

@ -62,7 +62,7 @@ translate_builtin(
{emqx_ds_storage_reference, #{}} {emqx_ds_storage_reference, #{}}
end, end,
#{ #{
backend => builtin, backend => builtin_raft,
n_shards => NShards, n_shards => NShards,
n_sites => NSites, n_sites => NSites,
replication_factor => ReplFactor, replication_factor => ReplFactor,

View File

@ -570,7 +570,7 @@ wait_shards_online(Nodes = [Node | _]) ->
?retry(500, 10, [?assertEqual(NShards, shards_online(N)) || N <- Nodes]). ?retry(500, 10, [?assertEqual(NShards, shards_online(N)) || N <- Nodes]).
shards_online(Node) -> shards_online(Node) ->
length(erpc:call(Node, emqx_ds_builtin_db_sup, which_shards, [?PERSISTENT_MESSAGE_DB])). length(erpc:call(Node, emqx_ds_builtin_raft_db_sup, which_shards, [?PERSISTENT_MESSAGE_DB])).
get_mqtt_port(Node, Type) -> get_mqtt_port(Node, Type) ->
{_IP, Port} = erpc:call(Node, emqx_config, get, [[listeners, Type, default, bind]]), {_IP, Port} = erpc:call(Node, emqx_config, get, [[listeners, Type, default, bind]]),

View File

@ -180,7 +180,7 @@ prometheus_per_db(NodeOrAggr) ->
prometheus_per_db(NodeOrAggr, DB, Acc) prometheus_per_db(NodeOrAggr, DB, Acc)
end, end,
#{}, #{},
emqx_ds_builtin_db_sup:which_dbs() emqx_ds_builtin_raft_db_sup:which_dbs()
). ).
%% This function returns the data in the following format: %% This function returns the data in the following format:
@ -246,7 +246,7 @@ prometheus_per_shard(NodeOrAggr) ->
) )
end, end,
#{}, #{},
emqx_ds_builtin_db_sup:which_dbs() emqx_ds_builtin_raft_db_sup:which_dbs()
). ).
prometheus_per_shard(NodeOrAggr, DB, Shard, Acc0) -> prometheus_per_shard(NodeOrAggr, DB, Shard, Acc0) ->