Tidy up some undefined functions in dialyzer specs (#368)

This commit is contained in:
Martin Sumner 2021-11-05 09:15:25 +00:00
parent f5ba2fc1b9
commit 82cc76c8c6
4 changed files with 33 additions and 16 deletions

View file

@ -290,7 +290,12 @@ ink_close(Pid) ->
ink_doom(Pid) ->
gen_server:call(Pid, doom, infinity).
-spec ink_fold(pid(), integer(), {fun(), fun(), fun()}, any()) -> fun().
-spec ink_fold(pid(),
integer(),
{leveled_cdb:filter_fun(),
fun((string(), leveled_codec:sqn()) -> term()),
fun((term(), term()) -> term())},
term()) -> fun(() -> term()).
%% @doc
%% Fold over the journal from a starting sequence number (MinSQN), passing
%% in three functions and a snapshot of the penciller. The Fold functions
@ -728,9 +733,9 @@ handle_cast({confirm_delete, ManSQN, CDB}, State) ->
CheckSnapshotExpiryFun =
fun({_R, TS, _SnapSQN}) ->
Expiry = leveled_util:integer_time(TS) + State#state.snap_timeout,
% If Expiry has passed this will be false, and the snapshot
% will be removed from the list of registered snapshots and
% so will not longer block deletes
% If Expiry has passed this will be false, and the snapshot
% will be removed from the list of registered snapshots and
% so will not longer block deletes
leveled_util:integer_now() < Expiry
end,
RegisteredSnapshots0 =
@ -773,6 +778,7 @@ handle_cast({remove_logs, ForcedLogs}, State) ->
CDBopts0 = CDBopts#cdb_options{log_options = leveled_log:get_opts()},
{noreply, State#state{cdb_options = CDBopts0}}.
%% handle the bookie stopping and stop this snapshot
handle_info({'DOWN', BookieMonRef, process, _BookiePid, _Info},
State=#state{bookie_monref = BookieMonRef}) ->