1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
11 #include "rocksdb/options.h"
15 struct ImmutableDBOptions
{
17 explicit ImmutableDBOptions(const DBOptions
& options
);
19 void Dump(Logger
* log
) const;
21 bool create_if_missing
;
22 bool create_missing_column_families
;
26 std::shared_ptr
<RateLimiter
> rate_limiter
;
27 std::shared_ptr
<SstFileManager
> sst_file_manager
;
28 std::shared_ptr
<Logger
> info_log
;
29 InfoLogLevel info_log_level
;
30 int max_file_opening_threads
;
31 std::shared_ptr
<Statistics
> statistics
;
33 std::vector
<DbPath
> db_paths
;
34 std::string db_log_dir
;
36 uint32_t max_subcompactions
;
37 int max_background_flushes
;
38 size_t max_log_file_size
;
39 size_t log_file_time_to_roll
;
40 size_t keep_log_file_num
;
41 size_t recycle_log_file_num
;
42 uint64_t max_manifest_file_size
;
43 int table_cache_numshardbits
;
44 uint64_t wal_ttl_seconds
;
45 uint64_t wal_size_limit_mb
;
46 size_t manifest_preallocation_size
;
47 bool allow_mmap_reads
;
48 bool allow_mmap_writes
;
49 bool use_direct_reads
;
50 bool use_direct_io_for_flush_and_compaction
;
52 bool is_fd_close_on_exec
;
53 bool advise_random_on_open
;
54 size_t db_write_buffer_size
;
55 std::shared_ptr
<WriteBufferManager
> write_buffer_manager
;
56 DBOptions::AccessHint access_hint_on_compaction_start
;
57 bool new_table_reader_for_compaction_inputs
;
58 size_t random_access_max_buffer_size
;
59 bool use_adaptive_mutex
;
60 std::vector
<std::shared_ptr
<EventListener
>> listeners
;
61 bool enable_thread_tracking
;
62 bool enable_pipelined_write
;
63 bool allow_concurrent_memtable_write
;
64 bool enable_write_thread_adaptive_yield
;
65 uint64_t write_thread_max_yield_usec
;
66 uint64_t write_thread_slow_yield_usec
;
67 bool skip_stats_update_on_db_open
;
68 WALRecoveryMode wal_recovery_mode
;
70 std::shared_ptr
<Cache
> row_cache
;
72 WalFilter
* wal_filter
;
73 #endif // ROCKSDB_LITE
74 bool fail_if_options_file_error
;
75 bool dump_malloc_stats
;
76 bool avoid_flush_during_recovery
;
77 bool allow_ingest_behind
;
78 bool preserve_deletes
;
79 bool two_write_queues
;
80 bool manual_wal_flush
;
83 struct MutableDBOptions
{
85 explicit MutableDBOptions(const MutableDBOptions
& options
) = default;
86 explicit MutableDBOptions(const DBOptions
& options
);
88 void Dump(Logger
* log
) const;
90 int max_background_jobs
;
91 int base_background_compactions
;
92 int max_background_compactions
;
93 bool avoid_flush_during_shutdown
;
94 size_t writable_file_max_buffer_size
;
95 uint64_t delayed_write_rate
;
96 uint64_t max_total_wal_size
;
97 uint64_t delete_obsolete_files_period_micros
;
98 unsigned int stats_dump_period_sec
;
100 uint64_t bytes_per_sync
;
101 uint64_t wal_bytes_per_sync
;
102 size_t compaction_readahead_size
;
105 } // namespace rocksdb