fold from file counting
When folding, don't count tombstones towards the folding limit. Merge worker needs to be able to progress to LIMIT number of non-deleted entries.
This commit is contained in:
parent
f821b38ea2
commit
ec55a38c42
1 changed files with 2 additions and 0 deletions
|
@ -161,6 +161,8 @@ do_range_fold(Fun, Acc0, File, Range, N0) ->
|
|||
{stop, {limit, Acc, Key}};
|
||||
({Key,_}, {_,Acc}) when not ?KEY_IN_TO_RANGE(Key,Range)->
|
||||
{stop, {done, Acc}};
|
||||
({Key,?TOMBSTONE}, {N1,Acc}) when ?KEY_IN_FROM_RANGE(Key,Range) ->
|
||||
{continue, {N1, Fun(Key, ?TOMBSTONE, Acc)}};
|
||||
({Key,Value}, {N1,Acc}) when ?KEY_IN_FROM_RANGE(Key,Range) ->
|
||||
{continue, {N1-1, Fun(Key, Value, Acc)}};
|
||||
(_, Acc) ->
|
||||
|
|
Loading…
Reference in a new issue