From a88677d2cf83fc6ceb5e24c3780ef27a6cadce40 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Fri, 2 Sep 2016 14:16:31 -0700 Subject: [PATCH] Remove ImmutableCFOptions from public API Summary: There's no reference to ImmutableCFOptions elsewhere in /include/rocksdb. ImmutableCFOptions was introduced in this commit (https://github.com/facebook/rocksdb/commit/5665e5e285c25c1674567f747df92c131037d2dc) but later its reference in /include/rocksdb/table.h is removed. Test Plan: make all check Reviewers: IslamAbdelRahman, sdong, yhchiang Reviewed By: yhchiang Subscribers: yhchiang, andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D63177 --- HISTORY.md | 3 +- db/builder.h | 3 +- db/column_family.h | 6 +- db/compaction.h | 4 +- db/compaction_picker.h | 3 +- db/db_iter.h | 3 +- db/memtable.h | 5 +- db/repair.cc | 2 +- db/table_cache.h | 3 +- db/table_properties_collector_test.cc | 2 +- include/rocksdb/db.h | 1 - include/rocksdb/immutable_options.h | 107 ------------------ include/rocksdb/sst_file_writer.h | 2 +- include/rocksdb/table.h | 2 - java/rocksjni/write_batch.cc | 1 - java/rocksjni/write_batch_test.cc | 2 +- src.mk | 2 +- table/block_based_table_reader.h | 1 + table/cuckoo_table_reader.h | 1 + table/format.h | 1 + table/plain_table_index.h | 5 +- table/table_builder.h | 2 +- tools/sst_dump_tool.cc | 4 +- tools/sst_dump_tool_imp.h | 1 + util/{mutable_cf_options.cc => cf_options.cc} | 44 ++++++- util/{mutable_cf_options.h => cf_options.h} | 94 ++++++++++++++- util/options.cc | 42 ------- util/options_helper.h | 2 +- utilities/blob_db/blob_db.cc | 1 + utilities/column_aware_encoding_util.h | 2 +- utilities/date_tiered/date_tiered_db_impl.h | 1 + 31 files changed, 169 insertions(+), 183 deletions(-) delete mode 100644 include/rocksdb/immutable_options.h rename util/{mutable_cf_options.cc => cf_options.cc} (64%) rename util/{mutable_cf_options.h => cf_options.h} (69%) diff --git a/HISTORY.md b/HISTORY.md index b7c58a944..ad7b4e300 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,7 +2,8 @@ ## Unreleased ### Public API Change * CancelAllBackgroundWork() flushes all memtables for databases containing writes that have bypassed the WAL (writes issued with WriteOptions::disableWAL=true) before shutting down background threads. -* Merge options source_compaction_factor, max_grandparent_overlap_bytes and expanded_compaction_factor into max_compaction_bytes +* Merge options source_compaction_factor, max_grandparent_overlap_bytes and expanded_compaction_factor into max_compaction_bytes. +* Remove ImmutableCFOptions. ### New Features * Introduce NewClockCache, which is based on CLOCK algorithm with better concurrent performance in some cases. It can be used to replace the default LRU-based block cache and table cache. To use it, RocksDB need to be linked with TBB lib. diff --git a/db/builder.h b/db/builder.h index 62aa717c6..e7e023623 100644 --- a/db/builder.h +++ b/db/builder.h @@ -12,14 +12,13 @@ #include "db/table_properties_collector.h" #include "rocksdb/comparator.h" #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/listener.h" #include "rocksdb/options.h" #include "rocksdb/status.h" #include "rocksdb/table_properties.h" #include "rocksdb/types.h" +#include "util/cf_options.h" #include "util/event_logger.h" -#include "util/mutable_cf_options.h" namespace rocksdb { diff --git a/db/column_family.h b/db/column_family.h index 8fb4d6a96..66d0448e1 100644 --- a/db/column_family.h +++ b/db/column_family.h @@ -15,15 +15,15 @@ #include #include "db/memtable_list.h" -#include "db/write_batch_internal.h" -#include "db/write_controller.h" #include "db/table_cache.h" #include "db/table_properties_collector.h" +#include "db/write_batch_internal.h" +#include "db/write_controller.h" #include "rocksdb/compaction_job_stats.h" #include "rocksdb/db.h" #include "rocksdb/env.h" #include "rocksdb/options.h" -#include "util/mutable_cf_options.h" +#include "util/cf_options.h" #include "util/thread_local.h" namespace rocksdb { diff --git a/db/compaction.h b/db/compaction.h index f31d92c40..a412ffbb6 100644 --- a/db/compaction.h +++ b/db/compaction.h @@ -8,10 +8,10 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #pragma once +#include "db/version_set.h" #include "util/arena.h" #include "util/autovector.h" -#include "util/mutable_cf_options.h" -#include "db/version_set.h" +#include "util/cf_options.h" namespace rocksdb { diff --git a/db/compaction_picker.h b/db/compaction_picker.h index fca731959..82f792c1d 100644 --- a/db/compaction_picker.h +++ b/db/compaction_picker.h @@ -20,8 +20,7 @@ #include "rocksdb/env.h" #include "rocksdb/options.h" #include "rocksdb/status.h" -#include "util/mutable_cf_options.h" - +#include "util/cf_options.h" namespace rocksdb { diff --git a/db/db_iter.h b/db/db_iter.h index 89db7ad38..f54e12267 100644 --- a/db/db_iter.h +++ b/db/db_iter.h @@ -10,11 +10,12 @@ #pragma once #include #include +#include "db/dbformat.h" #include "rocksdb/db.h" #include "rocksdb/iterator.h" -#include "db/dbformat.h" #include "util/arena.h" #include "util/autovector.h" +#include "util/cf_options.h" namespace rocksdb { diff --git a/db/memtable.h b/db/memtable.h index 62931613e..e9e370a41 100644 --- a/db/memtable.h +++ b/db/memtable.h @@ -15,17 +15,16 @@ #include #include #include "db/dbformat.h" +#include "db/memtable_allocator.h" #include "db/skiplist.h" #include "db/version_edit.h" #include "rocksdb/db.h" #include "rocksdb/env.h" #include "rocksdb/memtablerep.h" -#include "rocksdb/immutable_options.h" -#include "db/memtable_allocator.h" +#include "util/cf_options.h" #include "util/concurrent_arena.h" #include "util/dynamic_bloom.h" #include "util/instrumented_mutex.h" -#include "util/mutable_cf_options.h" namespace rocksdb { diff --git a/db/repair.cc b/db/repair.cc index a46e33f2d..9ba49fb2f 100644 --- a/db/repair.cc +++ b/db/repair.cc @@ -78,10 +78,10 @@ #include "rocksdb/comparator.h" #include "rocksdb/db.h" #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/options.h" #include "rocksdb/write_buffer_manager.h" #include "table/scoped_arena_iterator.h" +#include "util/cf_options.h" #include "util/file_reader_writer.h" #include "util/string_util.h" diff --git a/db/table_cache.h b/db/table_cache.h index cdd0f23dc..402b94fe5 100644 --- a/db/table_cache.h +++ b/db/table_cache.h @@ -18,9 +18,10 @@ #include "port/port.h" #include "rocksdb/cache.h" #include "rocksdb/env.h" -#include "rocksdb/table.h" #include "rocksdb/options.h" +#include "rocksdb/table.h" #include "table/table_reader.h" +#include "util/cf_options.h" namespace rocksdb { diff --git a/db/table_properties_collector_test.cc b/db/table_properties_collector_test.cc index 203317267..6b0cf45a3 100644 --- a/db/table_properties_collector_test.cc +++ b/db/table_properties_collector_test.cc @@ -12,12 +12,12 @@ #include "db/db_impl.h" #include "db/dbformat.h" #include "db/table_properties_collector.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/table.h" #include "table/block_based_table_factory.h" #include "table/meta_blocks.h" #include "table/plain_table_factory.h" #include "table/table_builder.h" +#include "util/cf_options.h" #include "util/coding.h" #include "util/file_reader_writer.h" #include "util/testharness.h" diff --git a/include/rocksdb/db.h b/include/rocksdb/db.h index 0e3a3415b..280e919e4 100644 --- a/include/rocksdb/db.h +++ b/include/rocksdb/db.h @@ -15,7 +15,6 @@ #include #include #include -#include "rocksdb/immutable_options.h" #include "rocksdb/iterator.h" #include "rocksdb/listener.h" #include "rocksdb/metadata.h" diff --git a/include/rocksdb/immutable_options.h b/include/rocksdb/immutable_options.h deleted file mode 100644 index 9417aa2e9..000000000 --- a/include/rocksdb/immutable_options.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. - -#pragma once - -#include -#include -#include "rocksdb/options.h" - -namespace rocksdb { - -// ImmutableCFOptions is a data struct used by RocksDB internal. It contains a -// subset of Options that should not be changed during the entire lifetime -// of DB. You shouldn't need to access this data structure unless you are -// implementing a new TableFactory. Raw pointers defined in this struct do -// not have ownership to the data they point to. Options contains shared_ptr -// to these data. -struct ImmutableCFOptions { - explicit ImmutableCFOptions(const Options& options); - - CompactionStyle compaction_style; - - CompactionOptionsUniversal compaction_options_universal; - CompactionOptionsFIFO compaction_options_fifo; - - const SliceTransform* prefix_extractor; - - const Comparator* comparator; - - MergeOperator* merge_operator; - - const CompactionFilter* compaction_filter; - - CompactionFilterFactory* compaction_filter_factory; - - bool inplace_update_support; - - UpdateStatus (*inplace_callback)(char* existing_value, - uint32_t* existing_value_size, - Slice delta_value, - std::string* merged_value); - - Logger* info_log; - - Statistics* statistics; - - InfoLogLevel info_log_level; - - Env* env; - - uint64_t delayed_write_rate; - - // Allow the OS to mmap file for reading sst tables. Default: false - bool allow_mmap_reads; - - // Allow the OS to mmap file for writing. Default: false - bool allow_mmap_writes; - - std::vector db_paths; - - MemTableRepFactory* memtable_factory; - - TableFactory* table_factory; - - Options::TablePropertiesCollectorFactories - table_properties_collector_factories; - - bool advise_random_on_open; - - // This options is required by PlainTableReader. May need to move it - // to PlainTalbeOptions just like bloom_bits_per_key - uint32_t bloom_locality; - - bool purge_redundant_kvs_while_flush; - - bool disable_data_sync; - - bool use_fsync; - - std::vector compression_per_level; - - CompressionType bottommost_compression; - - CompressionOptions compression_opts; - - bool level_compaction_dynamic_level_bytes; - - Options::AccessHint access_hint_on_compaction_start; - - bool new_table_reader_for_compaction_inputs; - - size_t compaction_readahead_size; - - int num_levels; - - bool optimize_filters_for_hits; - - // A vector of EventListeners which call-back functions will be called - // when specific RocksDB event happens. - std::vector> listeners; - - std::shared_ptr row_cache; -}; - -} // namespace rocksdb diff --git a/include/rocksdb/sst_file_writer.h b/include/rocksdb/sst_file_writer.h index 530bed186..0f8bf4a30 100644 --- a/include/rocksdb/sst_file_writer.h +++ b/include/rocksdb/sst_file_writer.h @@ -6,7 +6,7 @@ #pragma once #include #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" +#include "rocksdb/options.h" #include "rocksdb/types.h" namespace rocksdb { diff --git a/include/rocksdb/table.h b/include/rocksdb/table.h index 2342f724c..9eb5968cf 100644 --- a/include/rocksdb/table.h +++ b/include/rocksdb/table.h @@ -22,7 +22,6 @@ #include "rocksdb/cache.h" #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/iterator.h" #include "rocksdb/options.h" #include "rocksdb/status.h" @@ -435,7 +434,6 @@ class TableFactory { // (4) When running Repairer, it creates a table builder to convert logs to // SST files (In Repairer::ConvertLogToTable() by calling BuildTable()) // - // ImmutableCFOptions is a subset of Options that can not be altered. // Multiple configured can be acceseed from there, including and not limited // to compression options. file is a handle of a writable file. // It is the caller's responsibility to keep the file open and close the file diff --git a/java/rocksjni/write_batch.cc b/java/rocksjni/write_batch.cc index 2ae958702..67d57963a 100644 --- a/java/rocksjni/write_batch.cc +++ b/java/rocksjni/write_batch.cc @@ -13,7 +13,6 @@ #include "include/org_rocksdb_WriteBatch_Handler.h" #include "rocksdb/db.h" #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/memtablerep.h" #include "rocksdb/status.h" #include "rocksdb/write_batch.h" diff --git a/java/rocksjni/write_batch_test.cc b/java/rocksjni/write_batch_test.cc index 371744e4f..40b82d9d1 100644 --- a/java/rocksjni/write_batch_test.cc +++ b/java/rocksjni/write_batch_test.cc @@ -15,13 +15,13 @@ #include "include/org_rocksdb_WriteBatch_Handler.h" #include "rocksdb/db.h" #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/memtablerep.h" #include "rocksdb/status.h" #include "rocksdb/write_batch.h" #include "rocksdb/write_buffer_manager.h" #include "rocksjni/portal.h" #include "table/scoped_arena_iterator.h" +#include "util/cf_options.h" #include "util/logging.h" #include "util/testharness.h" diff --git a/src.mk b/src.mk index 76299958e..35a877575 100644 --- a/src.mk +++ b/src.mk @@ -156,12 +156,12 @@ LIB_SOURCES = \ utilities/date_tiered/date_tiered_db_impl.cc \ utilities/write_batch_with_index/write_batch_with_index.cc \ utilities/write_batch_with_index/write_batch_with_index_internal.cc \ + util/cf_options.cc \ util/event_logger.cc \ util/log_buffer.cc \ util/logging.cc \ util/memenv.cc \ util/murmurhash.cc \ - util/mutable_cf_options.cc \ util/options.cc \ util/options_helper.cc \ util/options_parser.cc \ diff --git a/table/block_based_table_reader.h b/table/block_based_table_reader.h index 41c33c33c..94561059d 100644 --- a/table/block_based_table_reader.h +++ b/table/block_based_table_reader.h @@ -22,6 +22,7 @@ #include "rocksdb/table.h" #include "table/table_properties_internal.h" #include "table/table_reader.h" +#include "util/cf_options.h" #include "util/coding.h" #include "util/file_reader_writer.h" diff --git a/table/cuckoo_table_reader.h b/table/cuckoo_table_reader.h index 5e3e5528a..7bfc72a0b 100644 --- a/table/cuckoo_table_reader.h +++ b/table/cuckoo_table_reader.h @@ -18,6 +18,7 @@ #include "rocksdb/env.h" #include "rocksdb/options.h" #include "table/table_reader.h" +#include "util/cf_options.h" #include "util/file_reader_writer.h" namespace rocksdb { diff --git a/table/format.h b/table/format.h index 571659d59..b885103ad 100644 --- a/table/format.h +++ b/table/format.h @@ -17,6 +17,7 @@ #include "port/port.h" // noexcept #include "table/persistent_cache_helper.h" +#include "util/cf_options.h" namespace rocksdb { diff --git a/table/plain_table_index.h b/table/plain_table_index.h index ab2be3d1e..c75abc86a 100644 --- a/table/plain_table_index.h +++ b/table/plain_table_index.h @@ -12,10 +12,11 @@ #include "db/dbformat.h" #include "rocksdb/options.h" -#include "util/murmurhash.h" -#include "util/hash.h" #include "util/arena.h" +#include "util/cf_options.h" +#include "util/hash.h" #include "util/histogram.h" +#include "util/murmurhash.h" namespace rocksdb { diff --git a/table/table_builder.h b/table/table_builder.h index be19636f6..aafd3ad8f 100644 --- a/table/table_builder.h +++ b/table/table_builder.h @@ -16,8 +16,8 @@ #include "db/table_properties_collector.h" #include "rocksdb/options.h" #include "rocksdb/table_properties.h" +#include "util/cf_options.h" #include "util/file_reader_writer.h" -#include "util/mutable_cf_options.h" namespace rocksdb { diff --git a/tools/sst_dump_tool.cc b/tools/sst_dump_tool.cc index 4b8b92e6b..a2f8d08d9 100644 --- a/tools/sst_dump_tool.cc +++ b/tools/sst_dump_tool.cc @@ -21,7 +21,6 @@ #include "db/write_batch_internal.h" #include "rocksdb/db.h" #include "rocksdb/env.h" -#include "rocksdb/immutable_options.h" #include "rocksdb/iterator.h" #include "rocksdb/slice_transform.h" #include "rocksdb/status.h" @@ -35,8 +34,9 @@ #include "table/meta_blocks.h" #include "table/plain_table_factory.h" #include "table/table_reader.h" -#include "util/random.h" +#include "util/cf_options.h" #include "util/compression.h" +#include "util/random.h" #include "port/port.h" diff --git a/tools/sst_dump_tool_imp.h b/tools/sst_dump_tool_imp.h index b518866cc..0ec8a7fc7 100644 --- a/tools/sst_dump_tool_imp.h +++ b/tools/sst_dump_tool_imp.h @@ -10,6 +10,7 @@ #include #include #include "db/dbformat.h" +#include "util/cf_options.h" #include "util/file_reader_writer.h" namespace rocksdb { diff --git a/util/mutable_cf_options.cc b/util/cf_options.cc similarity index 64% rename from util/mutable_cf_options.cc rename to util/cf_options.cc index b6d84c623..a24bc24e8 100644 --- a/util/mutable_cf_options.cc +++ b/util/cf_options.cc @@ -3,7 +3,7 @@ // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. -#include "util/mutable_cf_options.h" +#include "util/cf_options.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -16,10 +16,50 @@ #include "port/port.h" #include "rocksdb/env.h" #include "rocksdb/options.h" -#include "rocksdb/immutable_options.h" namespace rocksdb { +ImmutableCFOptions::ImmutableCFOptions(const Options& options) + : compaction_style(options.compaction_style), + compaction_options_universal(options.compaction_options_universal), + compaction_options_fifo(options.compaction_options_fifo), + prefix_extractor(options.prefix_extractor.get()), + comparator(options.comparator), + merge_operator(options.merge_operator.get()), + compaction_filter(options.compaction_filter), + compaction_filter_factory(options.compaction_filter_factory.get()), + inplace_update_support(options.inplace_update_support), + inplace_callback(options.inplace_callback), + info_log(options.info_log.get()), + statistics(options.statistics.get()), + env(options.env), + delayed_write_rate(options.delayed_write_rate), + allow_mmap_reads(options.allow_mmap_reads), + allow_mmap_writes(options.allow_mmap_writes), + db_paths(options.db_paths), + memtable_factory(options.memtable_factory.get()), + table_factory(options.table_factory.get()), + table_properties_collector_factories( + options.table_properties_collector_factories), + advise_random_on_open(options.advise_random_on_open), + bloom_locality(options.bloom_locality), + purge_redundant_kvs_while_flush(options.purge_redundant_kvs_while_flush), + disable_data_sync(options.disableDataSync), + use_fsync(options.use_fsync), + compression_per_level(options.compression_per_level), + bottommost_compression(options.bottommost_compression), + compression_opts(options.compression_opts), + level_compaction_dynamic_level_bytes( + options.level_compaction_dynamic_level_bytes), + access_hint_on_compaction_start(options.access_hint_on_compaction_start), + new_table_reader_for_compaction_inputs( + options.new_table_reader_for_compaction_inputs), + compaction_readahead_size(options.compaction_readahead_size), + num_levels(options.num_levels), + optimize_filters_for_hits(options.optimize_filters_for_hits), + listeners(options.listeners), + row_cache(options.row_cache) {} + // Multiple two operands. If they overflow, return op1. uint64_t MultiplyCheckOverflow(uint64_t op1, int op2) { if (op1 == 0) { diff --git a/util/mutable_cf_options.h b/util/cf_options.h similarity index 69% rename from util/mutable_cf_options.h rename to util/cf_options.h index b0f804f10..6a9db52d6 100644 --- a/util/mutable_cf_options.h +++ b/util/cf_options.h @@ -5,13 +5,105 @@ #pragma once +#include #include -#include "rocksdb/immutable_options.h" + #include "rocksdb/options.h" #include "util/compression.h" namespace rocksdb { +// ImmutableCFOptions is a data struct used by RocksDB internal. It contains a +// subset of Options that should not be changed during the entire lifetime +// of DB. Raw pointers defined in this struct do not have ownership to the data +// they point to. Options contains shared_ptr to these data. +struct ImmutableCFOptions { + explicit ImmutableCFOptions(const Options& options); + + CompactionStyle compaction_style; + + CompactionOptionsUniversal compaction_options_universal; + CompactionOptionsFIFO compaction_options_fifo; + + const SliceTransform* prefix_extractor; + + const Comparator* comparator; + + MergeOperator* merge_operator; + + const CompactionFilter* compaction_filter; + + CompactionFilterFactory* compaction_filter_factory; + + bool inplace_update_support; + + UpdateStatus (*inplace_callback)(char* existing_value, + uint32_t* existing_value_size, + Slice delta_value, + std::string* merged_value); + + Logger* info_log; + + Statistics* statistics; + + InfoLogLevel info_log_level; + + Env* env; + + uint64_t delayed_write_rate; + + // Allow the OS to mmap file for reading sst tables. Default: false + bool allow_mmap_reads; + + // Allow the OS to mmap file for writing. Default: false + bool allow_mmap_writes; + + std::vector db_paths; + + MemTableRepFactory* memtable_factory; + + TableFactory* table_factory; + + Options::TablePropertiesCollectorFactories + table_properties_collector_factories; + + bool advise_random_on_open; + + // This options is required by PlainTableReader. May need to move it + // to PlainTalbeOptions just like bloom_bits_per_key + uint32_t bloom_locality; + + bool purge_redundant_kvs_while_flush; + + bool disable_data_sync; + + bool use_fsync; + + std::vector compression_per_level; + + CompressionType bottommost_compression; + + CompressionOptions compression_opts; + + bool level_compaction_dynamic_level_bytes; + + Options::AccessHint access_hint_on_compaction_start; + + bool new_table_reader_for_compaction_inputs; + + size_t compaction_readahead_size; + + int num_levels; + + bool optimize_filters_for_hits; + + // A vector of EventListeners which call-back functions will be called + // when specific RocksDB event happens. + std::vector> listeners; + + std::shared_ptr row_cache; +}; + struct MutableCFOptions { MutableCFOptions(const Options& options, const ImmutableCFOptions& ioptions) : write_buffer_size(options.write_buffer_size), diff --git a/util/options.cc b/util/options.cc index 152169667..87068bd7e 100644 --- a/util/options.cc +++ b/util/options.cc @@ -8,7 +8,6 @@ // found in the LICENSE file. See the AUTHORS file for names of contributors. #include "rocksdb/options.h" -#include "rocksdb/immutable_options.h" #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -36,47 +35,6 @@ namespace rocksdb { -ImmutableCFOptions::ImmutableCFOptions(const Options& options) - : compaction_style(options.compaction_style), - compaction_options_universal(options.compaction_options_universal), - compaction_options_fifo(options.compaction_options_fifo), - prefix_extractor(options.prefix_extractor.get()), - comparator(options.comparator), - merge_operator(options.merge_operator.get()), - compaction_filter(options.compaction_filter), - compaction_filter_factory(options.compaction_filter_factory.get()), - inplace_update_support(options.inplace_update_support), - inplace_callback(options.inplace_callback), - info_log(options.info_log.get()), - statistics(options.statistics.get()), - env(options.env), - delayed_write_rate(options.delayed_write_rate), - allow_mmap_reads(options.allow_mmap_reads), - allow_mmap_writes(options.allow_mmap_writes), - db_paths(options.db_paths), - memtable_factory(options.memtable_factory.get()), - table_factory(options.table_factory.get()), - table_properties_collector_factories( - options.table_properties_collector_factories), - advise_random_on_open(options.advise_random_on_open), - bloom_locality(options.bloom_locality), - purge_redundant_kvs_while_flush(options.purge_redundant_kvs_while_flush), - disable_data_sync(options.disableDataSync), - use_fsync(options.use_fsync), - compression_per_level(options.compression_per_level), - bottommost_compression(options.bottommost_compression), - compression_opts(options.compression_opts), - level_compaction_dynamic_level_bytes( - options.level_compaction_dynamic_level_bytes), - access_hint_on_compaction_start(options.access_hint_on_compaction_start), - new_table_reader_for_compaction_inputs( - options.new_table_reader_for_compaction_inputs), - compaction_readahead_size(options.compaction_readahead_size), - num_levels(options.num_levels), - optimize_filters_for_hits(options.optimize_filters_for_hits), - listeners(options.listeners), - row_cache(options.row_cache) {} - ColumnFamilyOptions::ColumnFamilyOptions() : comparator(BytewiseComparator()), merge_operator(nullptr), diff --git a/util/options_helper.h b/util/options_helper.h index b59307068..f0b9e9b97 100644 --- a/util/options_helper.h +++ b/util/options_helper.h @@ -12,7 +12,7 @@ #include "rocksdb/options.h" #include "rocksdb/status.h" #include "rocksdb/table.h" -#include "util/mutable_cf_options.h" +#include "util/cf_options.h" #ifndef ROCKSDB_LITE namespace rocksdb { diff --git a/utilities/blob_db/blob_db.cc b/utilities/blob_db/blob_db.cc index fe37d5a19..c843f9510 100644 --- a/utilities/blob_db/blob_db.cc +++ b/utilities/blob_db/blob_db.cc @@ -13,6 +13,7 @@ #include "table/block.h" #include "table/block_based_table_builder.h" #include "table/block_builder.h" +#include "util/cf_options.h" #include "util/crc32c.h" #include "util/file_reader_writer.h" #include "util/instrumented_mutex.h" diff --git a/utilities/column_aware_encoding_util.h b/utilities/column_aware_encoding_util.h index a1f331393..0ee0a2634 100644 --- a/utilities/column_aware_encoding_util.h +++ b/utilities/column_aware_encoding_util.h @@ -9,11 +9,11 @@ #include #include "db/dbformat.h" #include "include/rocksdb/env.h" -#include "include/rocksdb/immutable_options.h" #include "include/rocksdb/listener.h" #include "include/rocksdb/options.h" #include "include/rocksdb/status.h" #include "table/block_based_table_reader.h" +#include "util/cf_options.h" namespace rocksdb { diff --git a/utilities/date_tiered/date_tiered_db_impl.h b/utilities/date_tiered/date_tiered_db_impl.h index 18e0e076a..bce5feefb 100644 --- a/utilities/date_tiered/date_tiered_db_impl.h +++ b/utilities/date_tiered/date_tiered_db_impl.h @@ -12,6 +12,7 @@ #include "rocksdb/db.h" #include "rocksdb/utilities/date_tiered_db.h" +#include "util/cf_options.h" #include "util/instrumented_mutex.h" namespace rocksdb {