Switch to using ets set as index of L0 cache
Hope is that this will cause less garbage collection, and also will be slightly faster. Note that snapshots don't now get an index - they get the special index 'snap'. However, the SkipLists have bloom protection, and most snapshots are iterators not fetchers.
This commit is contained in:
parent
06c58bf84b
commit
95d5e12ce7
2 changed files with 69 additions and 53 deletions
|
@ -395,7 +395,7 @@ handle_call({register_snapshot, Snapshot}, _From, State) ->
|
|||
Rs = [{Snapshot, State#state.manifest_sqn}|State#state.registered_snapshots],
|
||||
{reply, {ok, State}, State#state{registered_snapshots = Rs}};
|
||||
handle_call({load_snapshot, BookieIncrTree}, _From, State) ->
|
||||
L0D = leveled_pmem:add_to_index(State#state.levelzero_index,
|
||||
L0D = leveled_pmem:add_to_index(snap,
|
||||
State#state.levelzero_size,
|
||||
BookieIncrTree,
|
||||
State#state.ledger_sqn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue