Callers of bucket list expect the traversal to be in order
Due to the internal fold over buckets returning an un-reversed accumulator, the API bucketlist code caller's fold fun traversed the bucket list in reverse order. This lead to some inconsistencies when comparing a buckelist of all buckets, vs, first bucket only. i.e. the 'first' bucket passed to the foldfun was in fact the last bucket read from the ledger.
This commit is contained in:
parent
b34c0ff072
commit
5a95e82af0
1 changed files with 1 additions and 1 deletions
|
@ -420,7 +420,7 @@ foldobjects_byindex(SnapFun, {Tag, Bucket, Field, FromTerm, ToTerm}, FoldFun) ->
|
|||
%%%============================================================================
|
||||
|
||||
get_nextbucket(_NextB, _NextK, _Tag, _LS, BKList, {Limit, Limit}) ->
|
||||
BKList;
|
||||
lists:reverse(BKList);
|
||||
get_nextbucket(NextBucket, NextKey, Tag, LedgerSnapshot, BKList, {C, L}) ->
|
||||
Now = leveled_util:integer_now(),
|
||||
StartKey = leveled_codec:to_ledgerkey(NextBucket, NextKey, Tag),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue