fix(ds): Fix build
This commit is contained in:
parent
b29c5ad23c
commit
cfcd81e17b
|
@ -73,7 +73,7 @@
|
||||||
{ok, [message_id()]} | {error, _}.
|
{ok, [message_id()]} | {error, _}.
|
||||||
message_store(_Msg, _Opts) ->
|
message_store(_Msg, _Opts) ->
|
||||||
%% TODO
|
%% TODO
|
||||||
ok.
|
{error, not_implemented}.
|
||||||
|
|
||||||
-spec message_store([emqx_types:message()]) -> {ok, [message_id()]} | {error, _}.
|
-spec message_store([emqx_types:message()]) -> {ok, [message_id()]} | {error, _}.
|
||||||
message_store(Msg) ->
|
message_store(Msg) ->
|
||||||
|
@ -106,7 +106,7 @@ session_open(ClientID) ->
|
||||||
{false, ClientID, Iterators};
|
{false, ClientID, Iterators};
|
||||||
[] ->
|
[] ->
|
||||||
Session = #session{id = ClientID, iterators = []},
|
Session = #session{id = ClientID, iterators = []},
|
||||||
mnesia:write(?SESSION_TAB, Session),
|
mnesia:write(?SESSION_TAB, Session, write),
|
||||||
{true, ClientID, []}
|
{true, ClientID, []}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -117,10 +117,10 @@ session_open(ClientID) ->
|
||||||
%% during session GC
|
%% during session GC
|
||||||
-spec session_drop(emqx_types:clientid()) -> ok.
|
-spec session_drop(emqx_types:clientid()) -> ok.
|
||||||
session_drop(ClientID) ->
|
session_drop(ClientID) ->
|
||||||
{atomic, ok} = mnesia:transaction(
|
{atomic, ok} = mria:transaction(
|
||||||
?DS_SHARD,
|
?DS_SHARD,
|
||||||
fun() ->
|
fun() ->
|
||||||
mnesia:delete(?SESSION_TAB, ClientID)
|
mnesia:delete({?SESSION_TAB, ClientID})
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
ok.
|
ok.
|
||||||
|
@ -146,7 +146,7 @@ session_add_iterator(_SessionId, _TopicFilter) ->
|
||||||
{ok, boolean()} | {error, session_not_found}.
|
{ok, boolean()} | {error, session_not_found}.
|
||||||
session_del_iterator(_SessionId, _TopicFilter) ->
|
session_del_iterator(_SessionId, _TopicFilter) ->
|
||||||
%% TODO
|
%% TODO
|
||||||
false.
|
{ok, false}.
|
||||||
|
|
||||||
-spec session_stats() -> #{}.
|
-spec session_stats() -> #{}.
|
||||||
session_stats() ->
|
session_stats() ->
|
||||||
|
@ -166,7 +166,7 @@ iterator_update(_IterId, _Iter) ->
|
||||||
-spec iterator_next(iterator()) -> {value, emqx_types:message(), iterator()} | none | {error, _}.
|
-spec iterator_next(iterator()) -> {value, emqx_types:message(), iterator()} | none | {error, _}.
|
||||||
iterator_next(_Iter) ->
|
iterator_next(_Iter) ->
|
||||||
%% TODO
|
%% TODO
|
||||||
ok.
|
none.
|
||||||
|
|
||||||
-spec iterator_stats() -> #{}.
|
-spec iterator_stats() -> #{}.
|
||||||
iterator_stats() ->
|
iterator_stats() ->
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{application, emqx_ds, [
|
{application, emqx_durable_storage, [
|
||||||
{description, "Message persistence and subscription replays for EMQX"},
|
{description, "Message persistence and subscription replays for EMQX"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib, rocksdb, gproc]},
|
{applications, [kernel, stdlib, rocksdb, gproc, mria]},
|
||||||
{mod, {emqx_ds_app, []}},
|
{mod, {emqx_ds_app, []}},
|
||||||
{env, []}
|
{env, []}
|
||||||
]}.
|
]}.
|
||||||
|
|
|
@ -255,11 +255,11 @@ parse_topic(Topic) ->
|
||||||
all() -> emqx_common_test_helpers:all(?MODULE).
|
all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
{ok, _} = application:ensure_all_started(emqx_ds),
|
{ok, _} = application:ensure_all_started(emqx_durable_storage),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
ok = application:stop(emqx_ds).
|
ok = application:stop(emqx_durable_storage).
|
||||||
|
|
||||||
init_per_testcase(TC, Config) ->
|
init_per_testcase(TC, Config) ->
|
||||||
ok = set_shard_config(shard(TC), ?DEFAULT_CONFIG),
|
ok = set_shard_config(shard(TC), ?DEFAULT_CONFIG),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/env elixir
|
#!/usr/bin/env elixir
|
||||||
|
|
||||||
defmodule CheckElixirApplications do
|
defmodule CheckElixirApplications do
|
||||||
alias EMQXUmbrella.MixProject
|
alias EMQXUmbrella.MixProject
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/env elixir
|
#!/usr/bin/env elixir
|
||||||
|
|
||||||
# ensure we have a fresh rebar.lock
|
# ensure we have a fresh rebar.lock
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/bin/env elixir
|
#!/usr/bin/env elixir
|
||||||
|
|
||||||
defmodule CheckElixirEMQXMachineBootDiscrepancies do
|
defmodule CheckElixirEMQXMachineBootDiscrepancies do
|
||||||
alias EMQXUmbrella.MixProject
|
alias EMQXUmbrella.MixProject
|
||||||
|
|
Loading…
Reference in New Issue