Fix Accumulators

Correct inefficient list accumulators
This commit is contained in:
Martin Sumner 2018-05-02 00:23:26 +01:00
parent 82a1449447
commit 0185b3aa7d
2 changed files with 4 additions and 4 deletions

View file

@ -175,7 +175,7 @@ aae_bustedjournal(_Config) ->
testutil:corrupt_journal(RootPath, HeadF, 1000, 2048, 1000),
{ok, Bookie2} = leveled_bookie:book_start(StartOpts),
FoldKeysFun = fun(B, K, Acc) -> Acc ++ [{B, K}] end,
FoldKeysFun = fun(B, K, Acc) -> [{B, K}|Acc] end,
AllKeyQuery = {keylist, o_rkv, {FoldKeysFun, []}},
{async, KeyF} = leveled_bookie:book_returnfolder(Bookie2, AllKeyQuery),
KeyList = KeyF(),