fix(ds): Fix build

This commit is contained in:
ieQu1 2023-06-21 00:00:43 +02:00
parent b29c5ad23c
commit cfcd81e17b
6 changed files with 13 additions and 13 deletions

View File

@ -73,7 +73,7 @@
{ok, [message_id()]} | {error, _}.
message_store(_Msg, _Opts) ->
%% TODO
ok.
{error, not_implemented}.
-spec message_store([emqx_types:message()]) -> {ok, [message_id()]} | {error, _}.
message_store(Msg) ->
@ -106,7 +106,7 @@ session_open(ClientID) ->
{false, ClientID, Iterators};
[] ->
Session = #session{id = ClientID, iterators = []},
mnesia:write(?SESSION_TAB, Session),
mnesia:write(?SESSION_TAB, Session, write),
{true, ClientID, []}
end
end
@ -117,10 +117,10 @@ session_open(ClientID) ->
%% during session GC
-spec session_drop(emqx_types:clientid()) -> ok.
session_drop(ClientID) ->
{atomic, ok} = mnesia:transaction(
{atomic, ok} = mria:transaction(
?DS_SHARD,
fun() ->
mnesia:delete(?SESSION_TAB, ClientID)
mnesia:delete({?SESSION_TAB, ClientID})
end
),
ok.
@ -146,7 +146,7 @@ session_add_iterator(_SessionId, _TopicFilter) ->
{ok, boolean()} | {error, session_not_found}.
session_del_iterator(_SessionId, _TopicFilter) ->
%% TODO
false.
{ok, false}.
-spec session_stats() -> #{}.
session_stats() ->
@ -166,7 +166,7 @@ iterator_update(_IterId, _Iter) ->
-spec iterator_next(iterator()) -> {value, emqx_types:message(), iterator()} | none | {error, _}.
iterator_next(_Iter) ->
%% TODO
ok.
none.
-spec iterator_stats() -> #{}.
iterator_stats() ->

View File

@ -1,11 +1,11 @@
%% -*- mode: erlang -*-
{application, emqx_ds, [
{application, emqx_durable_storage, [
{description, "Message persistence and subscription replays for EMQX"},
% strict semver, bump manually!
{vsn, "0.1.0"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib, rocksdb, gproc]},
{applications, [kernel, stdlib, rocksdb, gproc, mria]},
{mod, {emqx_ds_app, []}},
{env, []}
]}.

View File

@ -255,11 +255,11 @@ parse_topic(Topic) ->
all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
{ok, _} = application:ensure_all_started(emqx_ds),
{ok, _} = application:ensure_all_started(emqx_durable_storage),
Config.
end_per_suite(_Config) ->
ok = application:stop(emqx_ds).
ok = application:stop(emqx_durable_storage).
init_per_testcase(TC, Config) ->
ok = set_shard_config(shard(TC), ?DEFAULT_CONFIG),

View File

@ -1,4 +1,4 @@
#! /usr/bin/env elixir
#!/usr/bin/env elixir
defmodule CheckElixirApplications do
alias EMQXUmbrella.MixProject

View File

@ -1,4 +1,4 @@
#! /usr/bin/env elixir
#!/usr/bin/env elixir
# ensure we have a fresh rebar.lock

View File

@ -1,4 +1,4 @@
#! /usr/bin/env elixir
#!/usr/bin/env elixir
defmodule CheckElixirEMQXMachineBootDiscrepancies do
alias EMQXUmbrella.MixProject