Fix read() response to a prior fill
This commit is contained in:
parent
c23aeabc20
commit
6014b0584e
1 changed files with 3 additions and 0 deletions
|
@ -307,6 +307,8 @@ read_page(LogicalPN, #state{max_mem=MaxMem, mem_fh=FH,
|
||||||
io:format("BUMMER: ~s line ~w: incomplete write at ~p\n",
|
io:format("BUMMER: ~s line ~w: incomplete write at ~p\n",
|
||||||
[?MODULE, ?LINE, LogicalPN]),
|
[?MODULE, ?LINE, LogicalPN]),
|
||||||
error_unwritten;
|
error_unwritten;
|
||||||
|
{ok, <<2:8>>} ->
|
||||||
|
error_trimmed;
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
error_unwritten;
|
error_unwritten;
|
||||||
eof ->
|
eof ->
|
||||||
|
@ -439,6 +441,7 @@ basic_test() ->
|
||||||
ExpectedWaterFixMe = get__trim_watermark(P1),
|
ExpectedWaterFixMe = get__trim_watermark(P1),
|
||||||
|
|
||||||
ok = fill(P1, Epoch2, LPN+3),
|
ok = fill(P1, Epoch2, LPN+3),
|
||||||
|
error_trimmed = read(P1, Epoch2, LPN+3),
|
||||||
error_trimmed = fill(P1, Epoch2, LPN+3),
|
error_trimmed = fill(P1, Epoch2, LPN+3),
|
||||||
error_trimmed = trim(P1, Epoch2, LPN+3),
|
error_trimmed = trim(P1, Epoch2, LPN+3),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue