Fix read repair FLU tracking

This commit is contained in:
Scott Lystig Fritchie 2015-05-19 13:56:12 +09:00
parent f7274e7106
commit eaf007ec08

View file

@ -519,17 +519,17 @@ read_repair4([First|Rest]=MidsTails, ReturnMode, Chunk, Repaired, File, Offset,
Proxy = orddict:fetch(First, PD), Proxy = orddict:fetch(First, PD),
case ?FLU_PC:write_chunk(Proxy, EpochID, File, Offset, Chunk, ?TIMEOUT) of case ?FLU_PC:write_chunk(Proxy, EpochID, File, Offset, Chunk, ?TIMEOUT) of
ok -> ok ->
read_repair4(Rest, ReturnMode, Chunk, Repaired, File, Offset, read_repair4(Rest, ReturnMode, Chunk, [First|Repaired], File,
Size, Depth, STime, S); Offset, Size, Depth, STime, S);
{error, Retry} {error, Retry}
when Retry == partition; Retry == bad_epoch; Retry == wedged -> when Retry == partition; Retry == bad_epoch; Retry == wedged ->
read_repair3(MidsTails, ReturnMode, Chunk, Repaired, File, Offset, read_repair3(MidsTails, ReturnMode, Chunk, Repaired, File,
Size, Depth, STime, S); Offset, Size, Depth, STime, S);
{error, written} -> {error, written} ->
%% TODO: To be very paranoid, read the chunk here to verify %% TODO: To be very paranoid, read the chunk here to verify
%% that it is exactly our Chunk. %% that it is exactly our Chunk.
read_repair4(Rest, ReturnMode, Chunk, Repaired, File, Offset, read_repair4(Rest, ReturnMode, Chunk, Repaired, File,
Size, Depth, STime, S); Offset, Size, Depth, STime, S);
{error, not_written} -> {error, not_written} ->
exit({todo_should_never_happen,?MODULE,?LINE,File,Offset,Size}) exit({todo_should_never_happen,?MODULE,?LINE,File,Offset,Size})
end. end.