Revert ominshambles performance refactoring
To try and improve performance index entries had been removed from the Ledger Cache, and a shadow list of the LedgerCache (in SQN order) was kept to avoid gb_trees:to_list on push_mem. This did not go well. The issue was that ets does not deal with duplicate keys in the list when inserting (it will only insert one, but it is not clear which one). This has been reverted back out. The ETS parameters have been changed to [set, private]. It is not used as an iterator, and is no longer passed out of the process (the memtable_copy is sent instead). This also avoids the tab2list function being called.
This commit is contained in:
parent
8f29a6c40f
commit
f16f71ae81
6 changed files with 89 additions and 62 deletions
|
@ -192,6 +192,7 @@ fetchput_snapshot(_Config) ->
|
|||
io:format("Checked for replacement objects in active bookie" ++
|
||||
", old objects in snapshot~n"),
|
||||
|
||||
ok = filelib:ensure_dir(RootPath ++ "/ledger/ledger_files"),
|
||||
{ok, FNsA} = file:list_dir(RootPath ++ "/ledger/ledger_files"),
|
||||
ObjList3 = testutil:generate_objects(15000, 5002),
|
||||
lists:foreach(fun({_RN, Obj, Spc}) ->
|
||||
|
@ -212,6 +213,7 @@ fetchput_snapshot(_Config) ->
|
|||
testutil:check_forlist(SnapBookie3, lists:nth(length(CLs2), CLs2)),
|
||||
testutil:check_formissinglist(SnapBookie2, ChkList3),
|
||||
testutil:check_formissinglist(SnapBookie2, lists:nth(length(CLs2), CLs2)),
|
||||
testutil:check_forlist(Bookie2, ChkList2),
|
||||
testutil:check_forlist(SnapBookie3, ChkList2),
|
||||
testutil:check_forlist(SnapBookie2, ChkList1),
|
||||
io:format("Started new snapshot and check for new objects~n"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue