Only keep merged < level-size at last level
The previous fix introduced the issue, that we might observe a level that never gets merged, and thus some values may never be evicted.
This commit is contained in:
parent
166a127a43
commit
ef64425af3
1 changed files with 3 additions and 1 deletions
|
@ -547,7 +547,9 @@ main_loop(State = #state{ next=Next }) ->
|
|||
end;
|
||||
|
||||
?CAST(_From,{merge_done, Count, OutFileName})
|
||||
when Count =< ?BTREE_SIZE(State#state.level), State#state.c =:= undefined ->
|
||||
when Count =< ?BTREE_SIZE(State#state.level),
|
||||
State#state.c =:= undefined,
|
||||
Next =:= undefined ->
|
||||
|
||||
?log("merge_done, out:~w~n -> self", [Count]),
|
||||
|
||||
|
|
Loading…
Reference in a new issue