Penciller shutdown when empty
Stop the penciller from writing an empty file, when shutting down and the L0 Cache is empty. Also parameter fiddle to see impact of the Penciller changes.
This commit is contained in:
parent
20cc17f916
commit
c6ca973517
3 changed files with 9 additions and 6 deletions
|
@ -157,7 +157,7 @@
|
|||
-define(SHUTDOWN_WAITS, 60).
|
||||
-define(SHUTDOWN_PAUSE, 10000).
|
||||
-define(SNAPSHOT_TIMEOUT, 300000).
|
||||
-define(JITTER_PROBABILITY, 0.1).
|
||||
-define(JITTER_PROBABILITY, 0.01).
|
||||
|
||||
-record(state, {inker :: pid(),
|
||||
penciller :: pid(),
|
||||
|
|
|
@ -588,15 +588,18 @@ terminate(Reason, State) ->
|
|||
State
|
||||
end,
|
||||
case {UpdState#state.levelzero_pending,
|
||||
get_item(0, State#state.manifest, [])} of
|
||||
{true, []} ->
|
||||
get_item(0, State#state.manifest, []),
|
||||
gb_trees:size(State#state.levelzero_cache)} of
|
||||
{true, [], _} ->
|
||||
ok = leveled_sft:sft_close(State#state.levelzero_constructor);
|
||||
{false, []} ->
|
||||
{false, [], 0} ->
|
||||
io:format("Level 0 cache empty at close of Penciller~n");
|
||||
{false, [], _N} ->
|
||||
KL = roll_into_list(State#state.levelzero_cache),
|
||||
L0Pid = roll_memory(UpdState, KL, true),
|
||||
ok = leveled_sft:sft_close(L0Pid);
|
||||
_ ->
|
||||
ok
|
||||
io:format("No level zero action on close of Penciller~n")
|
||||
end,
|
||||
|
||||
leveled_pclerk:rollclerk_close(State#state.roll_clerk),
|
||||
|
|
|
@ -16,7 +16,7 @@ all() -> [
|
|||
many_put_fetch_head,
|
||||
journal_compaction,
|
||||
fetchput_snapshot,
|
||||
load_and_count ,
|
||||
load_and_count,
|
||||
load_and_count_withdelete,
|
||||
space_clear_ondelete
|
||||
].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue