
This is desirable to add back in going forward, but wasn't implemented in a safe or clear way. The way the bloom was or was not on the LoopState was clumsy, and it got persisted in multiple places without a CRC check. Intention to implement back in wherby it is requested on-demand by the Penciller, and then the SFT worker lifts it off disk and CRC checks it. So it is never on the SFT LoopState. Also it will be easier to control the logic over which levels have the bloom in the Penciller.
89 lines
No EOL
3.2 KiB
Erlang
89 lines
No EOL
3.2 KiB
Erlang
|
|
%% Tag to be used on standard Riak KV objects
|
|
-define(RIAK_TAG, o_rkv).
|
|
%% Tag to be used on K/V objects for non-Riak purposes
|
|
-define(STD_TAG, o).
|
|
%% Tag used for secondary index keys
|
|
-define(IDX_TAG, i).
|
|
|
|
%% Inker key type used for 'normal' objects
|
|
-define(INKT_STND, stnd).
|
|
%% Inker key type used for objects which contain no value, only key changes
|
|
%% This is used currently for objects formed under a 'retain' strategy on Inker
|
|
%% compaction, but could be used for special set-type objects
|
|
-define(INKT_KEYD, keyd).
|
|
%% Inker key type used for tombstones
|
|
-define(INKT_TOMB, tomb).
|
|
|
|
-record(sft_options,
|
|
{wait = true :: boolean(),
|
|
expire_tombstones = false :: boolean(),
|
|
penciller :: pid()}).
|
|
|
|
-record(penciller_work,
|
|
{next_sqn :: integer(),
|
|
clerk :: pid(),
|
|
src_level :: integer(),
|
|
manifest :: list(),
|
|
start_time :: tuple(),
|
|
ledger_filepath :: string(),
|
|
manifest_file :: string(),
|
|
new_manifest :: list(),
|
|
unreferenced_files :: list(),
|
|
target_is_basement = false ::boolean()}).
|
|
|
|
-record(level,
|
|
{level :: integer(),
|
|
is_basement = false :: boolean(),
|
|
timestamp :: integer()}).
|
|
|
|
-record(manifest_entry,
|
|
{start_key :: tuple(),
|
|
end_key :: tuple(),
|
|
owner :: pid(),
|
|
filename :: string()}).
|
|
|
|
-record(cdb_options,
|
|
{max_size :: integer(),
|
|
file_path :: string(),
|
|
waste_path :: string(),
|
|
binary_mode = false :: boolean(),
|
|
sync_strategy = sync}).
|
|
|
|
-record(inker_options,
|
|
{cdb_max_size :: integer(),
|
|
root_path :: string(),
|
|
cdb_options :: #cdb_options{},
|
|
start_snapshot = false :: boolean(),
|
|
source_inker :: pid(),
|
|
reload_strategy = [] :: list(),
|
|
waste_retention_period :: integer(),
|
|
max_run_length}).
|
|
|
|
-record(penciller_options,
|
|
{root_path :: string(),
|
|
max_inmemory_tablesize :: integer(),
|
|
start_snapshot = false :: boolean(),
|
|
source_penciller :: pid(),
|
|
levelzero_cointoss = false :: boolean}).
|
|
|
|
-record(iclerk_options,
|
|
{inker :: pid(),
|
|
max_run_length :: integer(),
|
|
cdb_options = #cdb_options{} :: #cdb_options{},
|
|
waste_retention_period :: integer(),
|
|
reload_strategy = [] :: list()}).
|
|
|
|
-record(r_content, {
|
|
metadata,
|
|
value :: term()
|
|
}).
|
|
|
|
-record(r_object, {
|
|
bucket,
|
|
key,
|
|
contents :: [#r_content{}],
|
|
vclock,
|
|
updatemetadata=dict:store(clean, true, dict:new()),
|
|
updatevalue :: term()}).
|
|
|