From 5420e9ca1f35f00e2e5331c1ca6de86b40bc8422 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Fri, 21 Feb 2014 15:28:57 +0900 Subject: [PATCH] Bugfix for read repair: if trimmed, try fill first then trim --- prototype/corfurl/src/corfurl.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prototype/corfurl/src/corfurl.erl b/prototype/corfurl/src/corfurl.erl index b92f8f4..ab0b127 100644 --- a/prototype/corfurl/src/corfurl.erl +++ b/prototype/corfurl/src/corfurl.erl @@ -138,11 +138,11 @@ read_repair_chain(Epoch, LPN, [Head|Rest] = Chain) -> error_badepoch; error_trimmed -> %% TODO: robustify - [ok = case ok_or_trim(corfurl_flu:trim(flu_pid(X), Epoch, LPN)) of - ok -> ok; - error_unwritten -> ok_or_trim(corfurl_flu:fill( + [ok = case ok_or_trim(corfurl_flu:fill(flu_pid(X), Epoch, LPN)) of + ok -> ok; + error_overwritten -> ok_or_trim(corfurl_flu:trim( flu_pid(X), Epoch, LPN)); - Else -> Else + Else -> Else end || X <- Rest], error_trimmed; error_unwritten ->