store log opts in pdict + inherit at proc start
This commit is contained in:
parent
fbe200f1ca
commit
d30ca16a17
6 changed files with 65 additions and 19 deletions
|
@ -174,13 +174,13 @@
|
|||
%% The inker will need to know what the reload strategy is, to inform the
|
||||
%% clerk about the rules to enforce during compaction.
|
||||
ink_start(InkerOpts) ->
|
||||
gen_server:start_link(?MODULE, [InkerOpts], []).
|
||||
gen_server:start_link(?MODULE, [leveled_log:get_opts(), InkerOpts], []).
|
||||
|
||||
-spec ink_snapstart(inker_options()) -> {ok, pid()}.
|
||||
%% @doc
|
||||
%% Don't link on startup as snapshot
|
||||
ink_snapstart(InkerOpts) ->
|
||||
gen_server:start(?MODULE, [InkerOpts], []).
|
||||
gen_server:start(?MODULE, [leveled_log:get_opts(), InkerOpts], []).
|
||||
|
||||
-spec ink_put(pid(),
|
||||
leveled_codec:ledger_key(),
|
||||
|
@ -450,7 +450,8 @@ ink_checksqn(Pid, LedgerSQN) ->
|
|||
%%% gen_server callbacks
|
||||
%%%============================================================================
|
||||
|
||||
init([InkerOpts]) ->
|
||||
init([LogOpts, InkerOpts]) ->
|
||||
leveled_log:save(LogOpts),
|
||||
leveled_rand:seed(),
|
||||
case {InkerOpts#inker_options.root_path,
|
||||
InkerOpts#inker_options.start_snapshot} of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue