@ -74,6 +74,7 @@ ColumnFamilyOptions BuildColumnFamilyOptions(
enum class OptionType {
enum class OptionType {
kBoolean ,
kBoolean ,
kInt ,
kInt ,
kVectorInt ,
kUInt ,
kUInt ,
kUInt32T ,
kUInt32T ,
kUInt64T ,
kUInt64T ,
@ -120,6 +121,8 @@ struct OptionTypeInfo {
int offset ;
int offset ;
OptionType type ;
OptionType type ;
OptionVerificationType verification ;
OptionVerificationType verification ;
bool is_mutable ;
int mutable_offset ;
} ;
} ;
// A helper function that converts "opt_address" to a std::string
// A helper function that converts "opt_address" to a std::string
@ -338,164 +341,191 @@ static std::unordered_map<std::string, OptionTypeInfo> cf_options_type_info = {
uint34_t * existing_value_size ,
uint34_t * existing_value_size ,
Slice delta_value ,
Slice delta_value ,
std : : string * merged_value ) ;
std : : string * merged_value ) ;
std : : vector < int > max_bytes_for_level_multiplier_additional ;
*/
*/
{ " report_bg_io_stats " ,
{ " report_bg_io_stats " ,
{ offsetof ( struct ColumnFamilyOptions , report_bg_io_stats ) ,
{ offsetof ( struct ColumnFamilyOptions , report_bg_io_stats ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , report_bg_io_stats ) } } ,
{ " compaction_measure_io_stats " ,
{ " compaction_measure_io_stats " ,
{ offsetof ( struct ColumnFamilyOptions , report_bg_io_stats ) ,
{ 0 , OptionType : : kBoolean , OptionVerificationType : : kDeprecated , false } } ,
OptionType : : kBoolean , OptionVerificationType : : kDeprecated } } ,
{ " disable_auto_compactions " ,
{ " disable_auto_compactions " ,
{ offsetof ( struct ColumnFamilyOptions , disable_auto_compactions ) ,
{ offsetof ( struct ColumnFamilyOptions , disable_auto_compactions ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , disable_auto_compactions ) } } ,
{ " filter_deletes " ,
{ " filter_deletes " ,
{ 0 , OptionType : : kBoolean , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kBoolean , OptionVerificationType : : kDeprecated , true } } ,
{ " inplace_update_support " ,
{ " inplace_update_support " ,
{ offsetof ( struct ColumnFamilyOptions , inplace_update_support ) ,
{ offsetof ( struct ColumnFamilyOptions , inplace_update_support ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , false } } ,
{ " level_compaction_dynamic_level_bytes " ,
{ " level_compaction_dynamic_level_bytes " ,
{ offsetof ( struct ColumnFamilyOptions ,
{ offsetof ( struct ColumnFamilyOptions ,
level_compaction_dynamic_level_bytes ) ,
level_compaction_dynamic_level_bytes ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , false } } ,
{ " optimize_filters_for_hits " ,
{ " optimize_filters_for_hits " ,
{ offsetof ( struct ColumnFamilyOptions , optimize_filters_for_hits ) ,
{ offsetof ( struct ColumnFamilyOptions , optimize_filters_for_hits ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , false } } ,
{ " paranoid_file_checks " ,
{ " paranoid_file_checks " ,
{ offsetof ( struct ColumnFamilyOptions , paranoid_file_checks ) ,
{ offsetof ( struct ColumnFamilyOptions , paranoid_file_checks ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , paranoid_file_checks ) } } ,
{ " purge_redundant_kvs_while_flush " ,
{ " purge_redundant_kvs_while_flush " ,
{ offsetof ( struct ColumnFamilyOptions , purge_redundant_kvs_while_flush ) ,
{ offsetof ( struct ColumnFamilyOptions , purge_redundant_kvs_while_flush ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , false } } ,
{ " verify_checksums_in_compaction " ,
{ " verify_checksums_in_compaction " ,
{ offsetof ( struct ColumnFamilyOptions , verify_checksums_in_compaction ) ,
{ offsetof ( struct ColumnFamilyOptions , verify_checksums_in_compaction ) ,
OptionType : : kBoolean , OptionVerificationType : : kNormal } } ,
OptionType : : kBoolean , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , verify_checksums_in_compaction ) } } ,
{ " soft_pending_compaction_bytes_limit " ,
{ " soft_pending_compaction_bytes_limit " ,
{ offsetof ( struct ColumnFamilyOptions , soft_pending_compaction_bytes_limit ) ,
{ offsetof ( struct ColumnFamilyOptions , soft_pending_compaction_bytes_limit ) ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , soft_pending_compaction_bytes_limit ) } } ,
{ " hard_pending_compaction_bytes_limit " ,
{ " hard_pending_compaction_bytes_limit " ,
{ offsetof ( struct ColumnFamilyOptions , hard_pending_compaction_bytes_limit ) ,
{ offsetof ( struct ColumnFamilyOptions , hard_pending_compaction_bytes_limit ) ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , hard_pending_compaction_bytes_limit ) } } ,
{ " hard_rate_limit " ,
{ " hard_rate_limit " ,
{ offsetof ( struct ColumnFamilyOptions , hard_rate_limit ) ,
{ 0 , OptionType : : kDouble , OptionVerificationType : : kDeprecated , true } } ,
OptionType : : kDouble , OptionVerificationType : : kDeprecated } } ,
{ " soft_rate_limit " ,
{ " soft_rate_limit " ,
{ offsetof ( struct ColumnFamilyOptions , soft_rate_limit ) ,
{ 0 , OptionType : : kDouble , OptionVerificationType : : kDeprecated , true } } ,
OptionType : : kDouble , OptionVerificationType : : kNormal } } ,
{ " max_compaction_bytes " ,
{ " max_compaction_bytes " ,
{ offsetof ( struct ColumnFamilyOptions , max_compaction_bytes ) ,
{ offsetof ( struct ColumnFamilyOptions , max_compaction_bytes ) ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , max_compaction_bytes ) } } ,
{ " expanded_compaction_factor " ,
{ " expanded_compaction_factor " ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated , true } } ,
{ " level0_file_num_compaction_trigger " ,
{ " level0_file_num_compaction_trigger " ,
{ offsetof ( struct ColumnFamilyOptions , level0_file_num_compaction_trigger ) ,
{ offsetof ( struct ColumnFamilyOptions , level0_file_num_compaction_trigger ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , level0_file_num_compaction_trigger ) } } ,
{ " level0_slowdown_writes_trigger " ,
{ " level0_slowdown_writes_trigger " ,
{ offsetof ( struct ColumnFamilyOptions , level0_slowdown_writes_trigger ) ,
{ offsetof ( struct ColumnFamilyOptions , level0_slowdown_writes_trigger ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , level0_slowdown_writes_trigger ) } } ,
{ " level0_stop_writes_trigger " ,
{ " level0_stop_writes_trigger " ,
{ offsetof ( struct ColumnFamilyOptions , level0_stop_writes_trigger ) ,
{ offsetof ( struct ColumnFamilyOptions , level0_stop_writes_trigger ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , true ,
{ " max_bytes_for_level_multiplier " ,
offsetof ( struct MutableCFOptions , level0_stop_writes_trigger ) } } ,
{ offsetof ( struct ColumnFamilyOptions , max_bytes_for_level_multiplier ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
{ " max_grandparent_overlap_factor " ,
{ " max_grandparent_overlap_factor " ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated , true } } ,
{ " max_mem_compaction_level " ,
{ " max_mem_compaction_level " ,
{ offsetof ( struct ColumnFamilyOptions , max_mem_compaction_level ) ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated , false } } ,
OptionType : : kInt , OptionVerificationType : : kDeprecated } } ,
{ " max_write_buffer_number " ,
{ " max_write_buffer_number " ,
{ offsetof ( struct ColumnFamilyOptions , max_write_buffer_number ) ,
{ offsetof ( struct ColumnFamilyOptions , max_write_buffer_number ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , max_write_buffer_number ) } } ,
{ " max_write_buffer_number_to_maintain " ,
{ " max_write_buffer_number_to_maintain " ,
{ offsetof ( struct ColumnFamilyOptions , max_write_buffer_number_to_maintain ) ,
{ offsetof ( struct ColumnFamilyOptions , max_write_buffer_number_to_maintain ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , false } } ,
{ " min_write_buffer_number_to_merge " ,
{ " min_write_buffer_number_to_merge " ,
{ offsetof ( struct ColumnFamilyOptions , min_write_buffer_number_to_merge ) ,
{ offsetof ( struct ColumnFamilyOptions , min_write_buffer_number_to_merge ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , false } } ,
{ " num_levels " ,
{ " num_levels " ,
{ offsetof ( struct ColumnFamilyOptions , num_levels ) , OptionType : : kInt ,
{ offsetof ( struct ColumnFamilyOptions , num_levels ) , OptionType : : kInt ,
OptionVerificationType : : kNormal } } ,
OptionVerificationType : : kNormal , false } } ,
{ " source_compaction_factor " ,
{ " source_compaction_factor " ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kInt , OptionVerificationType : : kDeprecated , true } } ,
{ " target_file_size_multiplier " ,
{ " target_file_size_multiplier " ,
{ offsetof ( struct ColumnFamilyOptions , target_file_size_multiplier ) ,
{ offsetof ( struct ColumnFamilyOptions , target_file_size_multiplier ) ,
OptionType : : kInt , OptionVerificationType : : kNormal } } ,
OptionType : : kInt , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , target_file_size_multiplier ) } } ,
{ " arena_block_size " ,
{ " arena_block_size " ,
{ offsetof ( struct ColumnFamilyOptions , arena_block_size ) ,
{ offsetof ( struct ColumnFamilyOptions , arena_block_size ) ,
OptionType : : kSizeT , OptionVerificationType : : kNormal } } ,
OptionType : : kSizeT , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , arena_block_size ) } } ,
{ " inplace_update_num_locks " ,
{ " inplace_update_num_locks " ,
{ offsetof ( struct ColumnFamilyOptions , inplace_update_num_locks ) ,
{ offsetof ( struct ColumnFamilyOptions , inplace_update_num_locks ) ,
OptionType : : kSizeT , OptionVerificationType : : kNormal } } ,
OptionType : : kSizeT , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , inplace_update_num_locks ) } } ,
{ " max_successive_merges " ,
{ " max_successive_merges " ,
{ offsetof ( struct ColumnFamilyOptions , max_successive_merges ) ,
{ offsetof ( struct ColumnFamilyOptions , max_successive_merges ) ,
OptionType : : kSizeT , OptionVerificationType : : kNormal } } ,
OptionType : : kSizeT , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , max_successive_merges ) } } ,
{ " memtable_huge_page_size " ,
{ " memtable_huge_page_size " ,
{ offsetof ( struct ColumnFamilyOptions , memtable_huge_page_size ) ,
{ offsetof ( struct ColumnFamilyOptions , memtable_huge_page_size ) ,
OptionType : : kSizeT , OptionVerificationType : : kNormal } } ,
OptionType : : kSizeT , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , memtable_huge_page_size ) } } ,
{ " memtable_prefix_bloom_huge_page_tlb_size " ,
{ " memtable_prefix_bloom_huge_page_tlb_size " ,
{ 0 , OptionType : : kSizeT , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kSizeT , OptionVerificationType : : kDeprecated , true } } ,
{ " write_buffer_size " ,
{ " write_buffer_size " ,
{ offsetof ( struct ColumnFamilyOptions , write_buffer_size ) ,
{ offsetof ( struct ColumnFamilyOptions , write_buffer_size ) ,
OptionType : : kSizeT , OptionVerificationType : : kNormal } } ,
OptionType : : kSizeT , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , write_buffer_size ) } } ,
{ " bloom_locality " ,
{ " bloom_locality " ,
{ offsetof ( struct ColumnFamilyOptions , bloom_locality ) ,
{ offsetof ( struct ColumnFamilyOptions , bloom_locality ) ,
OptionType : : kUInt32T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt32T , OptionVerificationType : : kNormal , false } } ,
{ " memtable_prefix_bloom_bits " ,
{ " memtable_prefix_bloom_bits " ,
{ 0 , OptionType : : kUInt32T , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kUInt32T , OptionVerificationType : : kDeprecated , true } } ,
{ " memtable_prefix_bloom_size_ratio " ,
{ " memtable_prefix_bloom_size_ratio " ,
{ offsetof ( struct ColumnFamilyOptions , memtable_prefix_bloom_size_ratio ) ,
{ offsetof ( struct ColumnFamilyOptions , memtable_prefix_bloom_size_ratio ) ,
OptionType : : kDouble , OptionVerificationType : : kNormal } } ,
OptionType : : kDouble , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , memtable_prefix_bloom_size_ratio ) } } ,
{ " memtable_prefix_bloom_probes " ,
{ " memtable_prefix_bloom_probes " ,
{ 0 , OptionType : : kUInt32T , OptionVerificationType : : kDeprecated } } ,
{ 0 , OptionType : : kUInt32T , OptionVerificationType : : kDeprecated , true } } ,
{ " min_partial_merge_operands " ,
{ " min_partial_merge_operands " ,
{ offsetof ( struct ColumnFamilyOptions , min_partial_merge_operands ) ,
{ offsetof ( struct ColumnFamilyOptions , min_partial_merge_operands ) ,
OptionType : : kUInt32T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt32T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , min_partial_merge_operands ) } } ,
{ " max_bytes_for_level_base " ,
{ " max_bytes_for_level_base " ,
{ offsetof ( struct ColumnFamilyOptions , max_bytes_for_level_base ) ,
{ offsetof ( struct ColumnFamilyOptions , max_bytes_for_level_base ) ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , max_bytes_for_level_base ) } } ,
{ " max_bytes_for_level_multiplier " ,
{ offsetof ( struct ColumnFamilyOptions , max_bytes_for_level_multiplier ) ,
OptionType : : kInt , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , max_bytes_for_level_multiplier ) } } ,
{ " max_bytes_for_level_multiplier_additional " ,
{ offsetof ( struct ColumnFamilyOptions ,
max_bytes_for_level_multiplier_additional ) ,
OptionType : : kVectorInt , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions ,
max_bytes_for_level_multiplier_additional ) } } ,
{ " max_sequential_skip_in_iterations " ,
{ " max_sequential_skip_in_iterations " ,
{ offsetof ( struct ColumnFamilyOptions , max_sequential_skip_in_iterations ) ,
{ offsetof ( struct ColumnFamilyOptions , max_sequential_skip_in_iterations ) ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , max_sequential_skip_in_iterations ) } } ,
{ " target_file_size_base " ,
{ " target_file_size_base " ,
{ offsetof ( struct ColumnFamilyOptions , target_file_size_base ) ,
{ offsetof ( struct ColumnFamilyOptions , target_file_size_base ) ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal } } ,
OptionType : : kUInt64T , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , target_file_size_base ) } } ,
{ " rate_limit_delay_max_milliseconds " ,
{ " rate_limit_delay_max_milliseconds " ,
{ offsetof ( struct ColumnFamilyOptions , rate_limit_delay_max_milliseconds ) ,
{ 0 , OptionType : : kUInt , OptionVerificationType : : kDeprecated , false } } ,
OptionType : : kUInt , OptionVerificationType : : kDeprecated } } ,
{ " compression " ,
{ " compression " ,
{ offsetof ( struct ColumnFamilyOptions , compression ) ,
{ offsetof ( struct ColumnFamilyOptions , compression ) ,
OptionType : : kCompressionType , OptionVerificationType : : kNormal } } ,
OptionType : : kCompressionType , OptionVerificationType : : kNormal , true ,
offsetof ( struct MutableCFOptions , compression ) } } ,
{ " compression_per_level " ,
{ " compression_per_level " ,
{ offsetof ( struct ColumnFamilyOptions , compression_per_level ) ,
{ offsetof ( struct ColumnFamilyOptions , compression_per_level ) ,
OptionType : : kVectorCompressionType , OptionVerificationType : : kNormal } } ,
OptionType : : kVectorCompressionType , OptionVerificationType : : kNormal ,
false } } ,
{ " bottommost_compression " ,
{ " bottommost_compression " ,
{ offsetof ( struct ColumnFamilyOptions , bottommost_compression ) ,
{ offsetof ( struct ColumnFamilyOptions , bottommost_compression ) ,
OptionType : : kCompressionType , OptionVerificationType : : kNormal } } ,
OptionType : : kCompressionType , OptionVerificationType : : kNormal , false } } ,
{ " comparator " ,
{ " comparator " ,
{ offsetof ( struct ColumnFamilyOptions , comparator ) , OptionType : : kComparator ,
{ offsetof ( struct ColumnFamilyOptions , comparator ) , OptionType : : kComparator ,
OptionVerificationType : : kByName } } ,
OptionVerificationType : : kByName , false } } ,
{ " prefix_extractor " ,
{ " prefix_extractor " ,
{ offsetof ( struct ColumnFamilyOptions , prefix_extractor ) ,
{ offsetof ( struct ColumnFamilyOptions , prefix_extractor ) ,
OptionType : : kSliceTransform , OptionVerificationType : : kByNameAllowNull } } ,
OptionType : : kSliceTransform , OptionVerificationType : : kByNameAllowNull ,
false } } ,
{ " memtable_factory " ,
{ " memtable_factory " ,
{ offsetof ( struct ColumnFamilyOptions , memtable_factory ) ,
{ offsetof ( struct ColumnFamilyOptions , memtable_factory ) ,
OptionType : : kMemTableRepFactory , OptionVerificationType : : kByName } } ,
OptionType : : kMemTableRepFactory , OptionVerificationType : : kByName , false } } ,
{ " table_factory " ,
{ " table_factory " ,
{ offsetof ( struct ColumnFamilyOptions , table_factory ) ,
{ offsetof ( struct ColumnFamilyOptions , table_factory ) ,
OptionType : : kTableFactory , OptionVerificationType : : kByName } } ,
OptionType : : kTableFactory , OptionVerificationType : : kByName , false } } ,
{ " compaction_filter " ,
{ " compaction_filter " ,
{ offsetof ( struct ColumnFamilyOptions , compaction_filter ) ,
{ offsetof ( struct ColumnFamilyOptions , compaction_filter ) ,
OptionType : : kCompactionFilter , OptionVerificationType : : kByName } } ,
OptionType : : kCompactionFilter , OptionVerificationType : : kByName , false } } ,
{ " compaction_filter_factory " ,
{ " compaction_filter_factory " ,
{ offsetof ( struct ColumnFamilyOptions , compaction_filter_factory ) ,
{ offsetof ( struct ColumnFamilyOptions , compaction_filter_factory ) ,
OptionType : : kCompactionFilterFactory , OptionVerificationType : : kByName } } ,
OptionType : : kCompactionFilterFactory , OptionVerificationType : : kByName ,
false } } ,
{ " merge_operator " ,
{ " merge_operator " ,
{ offsetof ( struct ColumnFamilyOptions , merge_operator ) ,
{ offsetof ( struct ColumnFamilyOptions , merge_operator ) ,
OptionType : : kMergeOperator , OptionVerificationType : : kByName } } ,
OptionType : : kMergeOperator , OptionVerificationType : : kByName , false } } ,
{ " compaction_style " ,
{ " compaction_style " ,
{ offsetof ( struct ColumnFamilyOptions , compaction_style ) ,
{ offsetof ( struct ColumnFamilyOptions , compaction_style ) ,
OptionType : : kCompactionStyle , OptionVerificationType : : kNormal } } } ;
OptionType : : kCompactionStyle , OptionVerificationType : : kNormal , false } } } ;
static std : : unordered_map < std : : string , OptionTypeInfo >
static std : : unordered_map < std : : string , OptionTypeInfo >
block_based_table_type_info = {
block_based_table_type_info = {