Add lookup support in head_only mode

Originally had disabled the ability to lookup individual values when running in head_only mode.  This is a saving of about 11% at PUT time (about 3 microseconds  per PUT) on a macbook.

Not sure this saving is sufficient enought to justify the extra work if this is used as an AAE Keystore with Bitcask and LWW (when we need to lookup the current value before adjusting).

So reverted to re-adding support for HEAD requests with these keys.
This commit is contained in:
Martin Sumner 2018-02-16 14:16:28 +00:00
parent 2b6281b2b5
commit 910ccb6072
5 changed files with 71 additions and 22 deletions

View file

@ -243,9 +243,9 @@ handle_cast({compact, Checker, InitiateFun, CloseFun, FilterFun, Inker, _TO},
{noreply, State}
end;
handle_cast({trim, Inker, PersistedSQN}, State) ->
[_Active|Manifest] = leveled_inker:ink_getmanifest(Inker),
ManifestAsList = leveled_inker:ink_getmanifest(Inker),
FilesToDelete =
leveled_imanifest:find_persistedentries(PersistedSQN, Manifest),
leveled_imanifest:find_persistedentries(PersistedSQN, ManifestAsList),
ok = update_inker(Inker, [], FilesToDelete),
{noreply, State};
handle_cast({hashtable_calc, HashTree, StartPos, CDBpid}, State) ->