]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/options/db_options.h
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / rocksdb / options / db_options.h
CommitLineData
7c673cae 1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
11fdf7f2
TL
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).
7c673cae
FG
5
6#pragma once
7
8#include <string>
9#include <vector>
10
11#include "rocksdb/options.h"
12
13namespace rocksdb {
14
15struct ImmutableDBOptions {
16 ImmutableDBOptions();
17 explicit ImmutableDBOptions(const DBOptions& options);
18
19 void Dump(Logger* log) const;
20
21 bool create_if_missing;
22 bool create_missing_column_families;
23 bool error_if_exists;
24 bool paranoid_checks;
25 Env* env;
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;
7c673cae
FG
30 int max_file_opening_threads;
31 std::shared_ptr<Statistics> statistics;
32 bool use_fsync;
33 std::vector<DbPath> db_paths;
34 std::string db_log_dir;
35 std::string wal_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;
51 bool allow_fallocate;
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;
7c673cae 58 size_t random_access_max_buffer_size;
7c673cae 59 bool use_adaptive_mutex;
7c673cae
FG
60 std::vector<std::shared_ptr<EventListener>> listeners;
61 bool enable_thread_tracking;
11fdf7f2 62 bool enable_pipelined_write;
7c673cae
FG
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;
69 bool allow_2pc;
70 std::shared_ptr<Cache> row_cache;
71#ifndef ROCKSDB_LITE
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;
11fdf7f2
TL
77 bool allow_ingest_behind;
78 bool preserve_deletes;
79 bool two_write_queues;
80 bool manual_wal_flush;
494da23a
TL
81 bool atomic_flush;
82 bool avoid_unnecessary_blocking_io;
7c673cae
FG
83};
84
85struct MutableDBOptions {
86 MutableDBOptions();
87 explicit MutableDBOptions(const MutableDBOptions& options) = default;
88 explicit MutableDBOptions(const DBOptions& options);
89
90 void Dump(Logger* log) const;
91
11fdf7f2 92 int max_background_jobs;
7c673cae
FG
93 int base_background_compactions;
94 int max_background_compactions;
95 bool avoid_flush_during_shutdown;
11fdf7f2 96 size_t writable_file_max_buffer_size;
7c673cae
FG
97 uint64_t delayed_write_rate;
98 uint64_t max_total_wal_size;
99 uint64_t delete_obsolete_files_period_micros;
100 unsigned int stats_dump_period_sec;
494da23a
TL
101 unsigned int stats_persist_period_sec;
102 size_t stats_history_buffer_size;
11fdf7f2
TL
103 int max_open_files;
104 uint64_t bytes_per_sync;
105 uint64_t wal_bytes_per_sync;
106 size_t compaction_readahead_size;
7c673cae
FG
107};
108
109} // namespace rocksdb