Update leveled_penciller.erl
Sometimes when testing (especially with coverage), the sst file is not alive when it is to be closed. Check it is alive before closing.
This commit is contained in:
parent
01f0dadbb3
commit
ffcd577f83
1 changed files with 10 additions and 1 deletions
|
@ -1210,7 +1210,7 @@ shutdown_manifest(Manifest, L0Constructor) ->
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
ok =
|
ok =
|
||||||
case is_pid(Owner) of
|
case check_alive(Owner) of
|
||||||
true ->
|
true ->
|
||||||
leveled_sst:sst_close(Owner);
|
leveled_sst:sst_close(Owner);
|
||||||
false ->
|
false ->
|
||||||
|
@ -1221,6 +1221,15 @@ shutdown_manifest(Manifest, L0Constructor) ->
|
||||||
EntryCloseFun(L0Constructor).
|
EntryCloseFun(L0Constructor).
|
||||||
|
|
||||||
|
|
||||||
|
-spec check_alive(pid()|undefined) -> boolean().
|
||||||
|
%% @doc
|
||||||
|
%% Double-check a processis active before attempting to terminate
|
||||||
|
check_alive(Owner) when is_pid(Owner) ->
|
||||||
|
is_process_alive(Owner);
|
||||||
|
check_alive(_Owner) ->
|
||||||
|
false.
|
||||||
|
|
||||||
|
|
||||||
-spec archive_files(list(), list()) -> ok.
|
-spec archive_files(list(), list()) -> ok.
|
||||||
%% @doc
|
%% @doc
|
||||||
%% Archive any sst files in the folder that have not been used to build the
|
%% Archive any sst files in the folder that have not been used to build the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue