From 6014b0584e7ce2eb7241a844371d2e1b9fba3ee8 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Sun, 16 Feb 2014 19:02:38 +0900 Subject: [PATCH] Fix read() response to a prior fill --- prototype/corfurl/src/corfurl_flu.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prototype/corfurl/src/corfurl_flu.erl b/prototype/corfurl/src/corfurl_flu.erl index 6ee0d0b..01e3d06 100644 --- a/prototype/corfurl/src/corfurl_flu.erl +++ b/prototype/corfurl/src/corfurl_flu.erl @@ -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", [?MODULE, ?LINE, LogicalPN]), error_unwritten; + {ok, <<2:8>>} -> + error_trimmed; {ok, _} -> error_unwritten; eof -> @@ -439,6 +441,7 @@ basic_test() -> ExpectedWaterFixMe = get__trim_watermark(P1), ok = fill(P1, Epoch2, LPN+3), + error_trimmed = read(P1, Epoch2, LPN+3), error_trimmed = fill(P1, Epoch2, LPN+3), error_trimmed = trim(P1, Epoch2, LPN+3),