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) ->
|
fetch_head(Key, Penciller, LedgerCache) ->
|
||||||
case leveled_skiplist:lookup(Key, LedgerCache#ledger_cache.skiplist) of
|
Hash = leveled_codec:magic_hash(Key),
|
||||||
{value, Head} ->
|
if
|
||||||
Head;
|
Hash /= no_lookup ->
|
||||||
none ->
|
L0R = leveled_skiplist:lookup(Key,
|
||||||
case leveled_penciller:pcl_fetch(Penciller, Key) of
|
Hash,
|
||||||
{Key, Head} ->
|
LedgerCache#ledger_cache.skiplist),
|
||||||
|
case L0R of
|
||||||
|
{value, Head} ->
|
||||||
Head;
|
Head;
|
||||||
not_present ->
|
none ->
|
||||||
not_present
|
case leveled_penciller:pcl_fetch(Penciller, Key, Hash) of
|
||||||
|
{Key, Head} ->
|
||||||
|
Head;
|
||||||
|
not_present ->
|
||||||
|
not_present
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -198,8 +198,6 @@
|
||||||
{"IC011",
|
{"IC011",
|
||||||
{info, "Not clearing filename ~s as modified delta is only ~w seconds"}},
|
{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",
|
{"PM002",
|
||||||
{info, "Completed dump of L0 cache to list of size ~w"}},
|
{info, "Completed dump of L0 cache to list of size ~w"}},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue