Fix to delete_pending state
This commit is contained in:
parent
415ac6017b
commit
419541f5dd
1 changed files with 9 additions and 1 deletions
|
@ -355,8 +355,16 @@ delete_pending({get_kv, LedgerKey, Hash}, _From, State) ->
|
||||||
{Result, _Stage, _SlotID, UpdState} = fetch(LedgerKey, Hash, State),
|
{Result, _Stage, _SlotID, UpdState} = fetch(LedgerKey, Hash, State),
|
||||||
{reply, Result, delete_pending, UpdState, ?DELETE_TIMEOUT};
|
{reply, Result, delete_pending, UpdState, ?DELETE_TIMEOUT};
|
||||||
delete_pending({get_kvrange, StartKey, EndKey, ScanWidth}, _From, State) ->
|
delete_pending({get_kvrange, StartKey, EndKey, ScanWidth}, _From, State) ->
|
||||||
|
FetchFun =
|
||||||
|
fun({SlotBin, SK, EK}, Acc) ->
|
||||||
|
Acc ++ binaryslot_trimmedlist(SlotBin, SK, EK)
|
||||||
|
end,
|
||||||
|
{SlotsToFetchBinList, SlotsToPoint} = fetch_range(StartKey,
|
||||||
|
EndKey,
|
||||||
|
ScanWidth,
|
||||||
|
State),
|
||||||
{reply,
|
{reply,
|
||||||
fetch_range(StartKey, EndKey, ScanWidth, State),
|
lists:foldl(FetchFun, [], SlotsToFetchBinList) ++ SlotsToPoint,
|
||||||
delete_pending,
|
delete_pending,
|
||||||
State,
|
State,
|
||||||
?DELETE_TIMEOUT};
|
?DELETE_TIMEOUT};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue