Stop second hash on fetch_head
The bookie should magic_hash for fetch_head, and now passes the hash to the Penciller so second hash not required.
This commit is contained in:
parent
2d3a40e6f1
commit
ccc993383d
2 changed files with 15 additions and 10 deletions
|
@ -728,15 +728,22 @@ startup(InkerOpts, PencillerOpts) ->
|
|||
|
||||
|
||||
fetch_head(Key, Penciller, LedgerCache) ->
|
||||
case leveled_skiplist:lookup(Key, LedgerCache#ledger_cache.skiplist) of
|
||||
{value, Head} ->
|
||||
Head;
|
||||
none ->
|
||||
case leveled_penciller:pcl_fetch(Penciller, Key) of
|
||||
{Key, Head} ->
|
||||
Hash = leveled_codec:magic_hash(Key),
|
||||
if
|
||||
Hash /= no_lookup ->
|
||||
L0R = leveled_skiplist:lookup(Key,
|
||||
Hash,
|
||||
LedgerCache#ledger_cache.skiplist),
|
||||
case L0R of
|
||||
{value, Head} ->
|
||||
Head;
|
||||
not_present ->
|
||||
not_present
|
||||
none ->
|
||||
case leveled_penciller:pcl_fetch(Penciller, Key, Hash) of
|
||||
{Key, Head} ->
|
||||
Head;
|
||||
not_present ->
|
||||
not_present
|
||||
end
|
||||
end
|
||||
end.
|
||||
|
||||
|
|
|
@ -198,8 +198,6 @@
|
|||
{"IC011",
|
||||
{info, "Not clearing filename ~s as modified delta is only ~w seconds"}},
|
||||
|
||||
{"PM001",
|
||||
{info, "Indexed new cache entry with total L0 cache size now ~w"}},
|
||||
{"PM002",
|
||||
{info, "Completed dump of L0 cache to list of size ~w"}},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue