@ -13,68 +13,70 @@ namespace rocksdb {
struct MutableCFOptions {
struct MutableCFOptions {
MutableCFOptions ( const Options & options , const ImmutableCFOptions & ioptions )
MutableCFOptions ( const Options & options , const ImmutableCFOptions & ioptions )
: write_buffer_size ( options . write_buffer_size ) ,
: write_buffer_size ( options . write_buffer_size ) ,
max_write_buffer_number ( options . max_write_buffer_number ) ,
max_write_buffer_number ( options . max_write_buffer_number ) ,
arena_block_size ( options . arena_block_size ) ,
arena_block_size ( options . arena_block_size ) ,
memtable_prefix_bloom_bits ( options . memtable_prefix_bloom_bits ) ,
memtable_prefix_bloom_bits ( options . memtable_prefix_bloom_bits ) ,
memtable_prefix_bloom_probes ( options . memtable_prefix_bloom_probes ) ,
memtable_prefix_bloom_probes ( options . memtable_prefix_bloom_probes ) ,
memtable_prefix_bloom_huge_page_tlb_size (
memtable_prefix_bloom_huge_page_tlb_size (
options . memtable_prefix_bloom_huge_page_tlb_size ) ,
options . memtable_prefix_bloom_huge_page_tlb_size ) ,
max_successive_merges ( options . max_successive_merges ) ,
max_successive_merges ( options . max_successive_merges ) ,
filter_deletes ( options . filter_deletes ) ,
filter_deletes ( options . filter_deletes ) ,
inplace_update_num_locks ( options . inplace_update_num_locks ) ,
inplace_update_num_locks ( options . inplace_update_num_locks ) ,
disable_auto_compactions ( options . disable_auto_compactions ) ,
disable_auto_compactions ( options . disable_auto_compactions ) ,
soft_rate_limit ( options . soft_rate_limit ) ,
soft_rate_limit ( options . soft_rate_limit ) ,
hard_rate_limit ( options . hard_rate_limit ) ,
hard_rate_limit ( options . hard_rate_limit ) ,
level0_file_num_compaction_trigger (
level0_file_num_compaction_trigger (
options . level0_file_num_compaction_trigger ) ,
options . level0_file_num_compaction_trigger ) ,
level0_slowdown_writes_trigger ( options . level0_slowdown_writes_trigger ) ,
level0_slowdown_writes_trigger ( options . level0_slowdown_writes_trigger ) ,
level0_stop_writes_trigger ( options . level0_stop_writes_trigger ) ,
level0_stop_writes_trigger ( options . level0_stop_writes_trigger ) ,
max_grandparent_overlap_factor ( options . max_grandparent_overlap_factor ) ,
max_grandparent_overlap_factor ( options . max_grandparent_overlap_factor ) ,
expanded_compaction_factor ( options . expanded_compaction_factor ) ,
expanded_compaction_factor ( options . expanded_compaction_factor ) ,
source_compaction_factor ( options . source_compaction_factor ) ,
source_compaction_factor ( options . source_compaction_factor ) ,
target_file_size_base ( options . target_file_size_base ) ,
target_file_size_base ( options . target_file_size_base ) ,
target_file_size_multiplier ( options . target_file_size_multiplier ) ,
target_file_size_multiplier ( options . target_file_size_multiplier ) ,
max_bytes_for_level_base ( options . max_bytes_for_level_base ) ,
max_bytes_for_level_base ( options . max_bytes_for_level_base ) ,
max_bytes_for_level_multiplier ( options . max_bytes_for_level_multiplier ) ,
max_bytes_for_level_multiplier ( options . max_bytes_for_level_multiplier ) ,
max_bytes_for_level_multiplier_additional (
max_bytes_for_level_multiplier_additional (
options . max_bytes_for_level_multiplier_additional ) ,
options . max_bytes_for_level_multiplier_additional ) ,
verify_checksums_in_compaction ( options . verify_checksums_in_compaction ) ,
verify_checksums_in_compaction ( options . verify_checksums_in_compaction ) ,
num_subcompactions ( options . num_subcompactions ) ,
num_subcompactions ( options . num_subcompactions ) ,
max_sequential_skip_in_iterations (
max_sequential_skip_in_iterations (
options . max_sequential_skip_in_iterations ) ,
options . max_sequential_skip_in_iterations ) ,
paranoid_file_checks ( options . paranoid_file_checks )
paranoid_file_checks ( options . paranoid_file_checks ) ,
compaction_measure_io_stats ( options . compaction_measure_io_stats )
{
{
RefreshDerivedOptions ( ioptions ) ;
RefreshDerivedOptions ( ioptions ) ;
}
}
MutableCFOptions ( )
MutableCFOptions ( )
: write_buffer_size ( 0 ) ,
: write_buffer_size ( 0 ) ,
max_write_buffer_number ( 0 ) ,
max_write_buffer_number ( 0 ) ,
arena_block_size ( 0 ) ,
arena_block_size ( 0 ) ,
memtable_prefix_bloom_bits ( 0 ) ,
memtable_prefix_bloom_bits ( 0 ) ,
memtable_prefix_bloom_probes ( 0 ) ,
memtable_prefix_bloom_probes ( 0 ) ,
memtable_prefix_bloom_huge_page_tlb_size ( 0 ) ,
memtable_prefix_bloom_huge_page_tlb_size ( 0 ) ,
max_successive_merges ( 0 ) ,
max_successive_merges ( 0 ) ,
filter_deletes ( false ) ,
filter_deletes ( false ) ,
inplace_update_num_locks ( 0 ) ,
inplace_update_num_locks ( 0 ) ,
disable_auto_compactions ( false ) ,
disable_auto_compactions ( false ) ,
soft_rate_limit ( 0 ) ,
soft_rate_limit ( 0 ) ,
hard_rate_limit ( 0 ) ,
hard_rate_limit ( 0 ) ,
level0_file_num_compaction_trigger ( 0 ) ,
level0_file_num_compaction_trigger ( 0 ) ,
level0_slowdown_writes_trigger ( 0 ) ,
level0_slowdown_writes_trigger ( 0 ) ,
level0_stop_writes_trigger ( 0 ) ,
level0_stop_writes_trigger ( 0 ) ,
max_grandparent_overlap_factor ( 0 ) ,
max_grandparent_overlap_factor ( 0 ) ,
expanded_compaction_factor ( 0 ) ,
expanded_compaction_factor ( 0 ) ,
source_compaction_factor ( 0 ) ,
source_compaction_factor ( 0 ) ,
target_file_size_base ( 0 ) ,
target_file_size_base ( 0 ) ,
target_file_size_multiplier ( 0 ) ,
target_file_size_multiplier ( 0 ) ,
max_bytes_for_level_base ( 0 ) ,
max_bytes_for_level_base ( 0 ) ,
max_bytes_for_level_multiplier ( 0 ) ,
max_bytes_for_level_multiplier ( 0 ) ,
verify_checksums_in_compaction ( false ) ,
verify_checksums_in_compaction ( false ) ,
num_subcompactions ( 1 ) ,
num_subcompactions ( 1 ) ,
max_sequential_skip_in_iterations ( 0 ) ,
max_sequential_skip_in_iterations ( 0 ) ,
paranoid_file_checks ( false )
paranoid_file_checks ( false ) ,
{ }
compaction_measure_io_stats ( false ) { }
// Must be called after any change to MutableCFOptions
// Must be called after any change to MutableCFOptions
void RefreshDerivedOptions ( const ImmutableCFOptions & ioptions ) ;
void RefreshDerivedOptions ( const ImmutableCFOptions & ioptions ) ;
@ -128,6 +130,7 @@ struct MutableCFOptions {
// Misc options
// Misc options
uint64_t max_sequential_skip_in_iterations ;
uint64_t max_sequential_skip_in_iterations ;
bool paranoid_file_checks ;
bool paranoid_file_checks ;
bool compaction_measure_io_stats ;
// Derived options
// Derived options
// Per-level target file size.
// Per-level target file size.