Rolback hash|no_hash and batch journal compaction
The no_hash option in CDB files became too hard to manage, in particular the need to scan the whole file to find the last_key rather than cheat and use the index. It has been removed for now. The writing to the journal during journal compaction has now been enhanced by a mput option on the CDB file write - so it can write each batch as one pwrite operation.
This commit is contained in:
parent
97087a6b2b
commit
2a47acc758
5 changed files with 103 additions and 68 deletions
|
@ -143,9 +143,9 @@ to_ledgerkey(Bucket, Key, Tag) ->
|
|||
to_inkerkv(LedgerKey, SQN, to_fetch, null) ->
|
||||
{{SQN, ?INKT_STND, LedgerKey}, null, true};
|
||||
to_inkerkv(LedgerKey, SQN, Object, KeyChanges) ->
|
||||
{InkerType, HashOpt} = check_forinkertype(LedgerKey, Object),
|
||||
InkerType = check_forinkertype(LedgerKey, Object),
|
||||
Value = create_value_for_journal({Object, KeyChanges}),
|
||||
{{SQN, InkerType, LedgerKey}, Value, HashOpt}.
|
||||
{{SQN, InkerType, LedgerKey}, Value}.
|
||||
|
||||
%% Used when fetching objects, so only handles standard, hashable entries
|
||||
from_inkerkv(Object) ->
|
||||
|
@ -192,9 +192,9 @@ split_inkvalue(VBin) ->
|
|||
end.
|
||||
|
||||
check_forinkertype(_LedgerKey, delete) ->
|
||||
{?INKT_TOMB, no_hash};
|
||||
?INKT_TOMB;
|
||||
check_forinkertype(_LedgerKey, _Object) ->
|
||||
{?INKT_STND, hash}.
|
||||
?INKT_STND.
|
||||
|
||||
create_value_for_journal(Value) ->
|
||||
case Value of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue