Add annoying & verbose TODO reminder for FILL implementation fixing!
This commit is contained in:
parent
1c5e8d3726
commit
22f46c329d
2 changed files with 2 additions and 0 deletions
|
@ -261,6 +261,7 @@ trim_page(#proj{epoch=Epoch} = P, LPN) ->
|
||||||
fill_or_trim_page([], _Epoch, _LPN, _Func) ->
|
fill_or_trim_page([], _Epoch, _LPN, _Func) ->
|
||||||
ok;
|
ok;
|
||||||
fill_or_trim_page([H|T], Epoch, LPN, Func) ->
|
fill_or_trim_page([H|T], Epoch, LPN, Func) ->
|
||||||
|
%% io:format(user, "~s.erl line ~w: TODO: this 'fill or trim' logic is probably stupid, due to mis-remembering the CORFU paper, sorry! Commenting out this warning line is OK, if you wish to proceed with testing Corfurl. This code can change a fill into a trim. Those things are supposed to be separate, silly me, a fill should never automagically change to a trim.\n", [?MODULE, ?LINE]),
|
||||||
case corfurl_flu:Func(flu_pid(H), Epoch, LPN) of
|
case corfurl_flu:Func(flu_pid(H), Epoch, LPN) of
|
||||||
Res when Res == ok; Res == error_trimmed ->
|
Res when Res == ok; Res == error_trimmed ->
|
||||||
%% Detecting a race here between fills and trims is too crazy,
|
%% Detecting a race here between fills and trims is too crazy,
|
||||||
|
|
|
@ -213,6 +213,7 @@ handle_call({{fill, ClientEpoch, _LogicalPN}, LC1}, _From,
|
||||||
{reply, {error_badepoch, LC2}, State};
|
{reply, {error_badepoch, LC2}, State};
|
||||||
handle_call({{fill, _ClientEpoch, LogicalPN}, LC1}, _From, State) ->
|
handle_call({{fill, _ClientEpoch, LogicalPN}, LC1}, _From, State) ->
|
||||||
LC2 = lclock_update(LC1),
|
LC2 = lclock_update(LC1),
|
||||||
|
io:format(user, "~s.erl line ~w: TODO: this 'fill or trim' logic is probably stupid, due to mis-remembering the CORFU paper, sorry! Commenting out this warning line is OK, if you wish to proceed with testing Corfurl. This code can change a fill into a trim. Those things are supposed to be separate, silly me, a fill should never automagically change to a trim.\n", [?MODULE, ?LINE]),
|
||||||
{Reply, NewState} = do_trim_or_fill(fill, LogicalPN, State),
|
{Reply, NewState} = do_trim_or_fill(fill, LogicalPN, State),
|
||||||
?EVENT_LOG({flu, fill, self(), LogicalPN, Reply}),
|
?EVENT_LOG({flu, fill, self(), LogicalPN, Reply}),
|
||||||
{reply, {Reply, LC2}, NewState};
|
{reply, {Reply, LC2}, NewState};
|
||||||
|
|
Loading…
Reference in a new issue