2016-09-24 01:34:04 +02:00
|
|
|
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
|
2017-07-16 01:03:42 +02:00
|
|
|
// This source code is licensed under both the GPLv2 (found in the
|
|
|
|
// COPYING file in the root directory) and Apache 2.0 License
|
|
|
|
// (found in the LICENSE.Apache file in the root directory).
|
2016-09-24 01:34:04 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "rocksdb/options.h"
|
|
|
|
|
|
|
|
namespace rocksdb {
|
|
|
|
|
|
|
|
struct ImmutableDBOptions {
|
|
|
|
ImmutableDBOptions();
|
|
|
|
explicit ImmutableDBOptions(const DBOptions& options);
|
|
|
|
|
|
|
|
void Dump(Logger* log) const;
|
|
|
|
|
|
|
|
bool create_if_missing;
|
|
|
|
bool create_missing_column_families;
|
|
|
|
bool error_if_exists;
|
|
|
|
bool paranoid_checks;
|
|
|
|
Env* env;
|
|
|
|
std::shared_ptr<RateLimiter> rate_limiter;
|
|
|
|
std::shared_ptr<SstFileManager> sst_file_manager;
|
|
|
|
std::shared_ptr<Logger> info_log;
|
|
|
|
InfoLogLevel info_log_level;
|
|
|
|
int max_file_opening_threads;
|
|
|
|
std::shared_ptr<Statistics> statistics;
|
|
|
|
bool use_fsync;
|
|
|
|
std::vector<DbPath> db_paths;
|
|
|
|
std::string db_log_dir;
|
|
|
|
std::string wal_dir;
|
|
|
|
uint32_t max_subcompactions;
|
|
|
|
int max_background_flushes;
|
|
|
|
size_t max_log_file_size;
|
|
|
|
size_t log_file_time_to_roll;
|
|
|
|
size_t keep_log_file_num;
|
|
|
|
size_t recycle_log_file_num;
|
|
|
|
uint64_t max_manifest_file_size;
|
|
|
|
int table_cache_numshardbits;
|
|
|
|
uint64_t wal_ttl_seconds;
|
|
|
|
uint64_t wal_size_limit_mb;
|
|
|
|
size_t manifest_preallocation_size;
|
|
|
|
bool allow_mmap_reads;
|
|
|
|
bool allow_mmap_writes;
|
2016-10-28 19:36:05 +02:00
|
|
|
bool use_direct_reads;
|
2017-04-13 22:07:33 +02:00
|
|
|
bool use_direct_io_for_flush_and_compaction;
|
2016-09-24 01:34:04 +02:00
|
|
|
bool allow_fallocate;
|
|
|
|
bool is_fd_close_on_exec;
|
|
|
|
bool advise_random_on_open;
|
|
|
|
size_t db_write_buffer_size;
|
|
|
|
std::shared_ptr<WriteBufferManager> write_buffer_manager;
|
|
|
|
DBOptions::AccessHint access_hint_on_compaction_start;
|
|
|
|
bool new_table_reader_for_compaction_inputs;
|
|
|
|
size_t compaction_readahead_size;
|
|
|
|
size_t random_access_max_buffer_size;
|
|
|
|
size_t writable_file_max_buffer_size;
|
|
|
|
bool use_adaptive_mutex;
|
|
|
|
uint64_t bytes_per_sync;
|
|
|
|
uint64_t wal_bytes_per_sync;
|
|
|
|
std::vector<std::shared_ptr<EventListener>> listeners;
|
|
|
|
bool enable_thread_tracking;
|
2017-05-19 23:24:23 +02:00
|
|
|
bool enable_pipelined_write;
|
2016-09-24 01:34:04 +02:00
|
|
|
bool allow_concurrent_memtable_write;
|
|
|
|
bool enable_write_thread_adaptive_yield;
|
|
|
|
uint64_t write_thread_max_yield_usec;
|
|
|
|
uint64_t write_thread_slow_yield_usec;
|
|
|
|
bool skip_stats_update_on_db_open;
|
|
|
|
WALRecoveryMode wal_recovery_mode;
|
|
|
|
bool allow_2pc;
|
|
|
|
std::shared_ptr<Cache> row_cache;
|
|
|
|
#ifndef ROCKSDB_LITE
|
|
|
|
WalFilter* wal_filter;
|
|
|
|
#endif // ROCKSDB_LITE
|
|
|
|
bool fail_if_options_file_error;
|
|
|
|
bool dump_malloc_stats;
|
|
|
|
bool avoid_flush_during_recovery;
|
2017-05-17 20:32:26 +02:00
|
|
|
bool allow_ingest_behind;
|
2017-06-24 23:06:43 +02:00
|
|
|
bool concurrent_prepare;
|
|
|
|
bool manual_wal_flush;
|
2017-09-18 23:36:53 +02:00
|
|
|
bool seq_per_batch;
|
2016-09-24 01:34:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct MutableDBOptions {
|
2016-10-14 21:25:39 +02:00
|
|
|
MutableDBOptions();
|
2016-09-24 01:34:04 +02:00
|
|
|
explicit MutableDBOptions(const MutableDBOptions& options) = default;
|
|
|
|
explicit MutableDBOptions(const DBOptions& options);
|
|
|
|
|
|
|
|
void Dump(Logger* log) const;
|
2016-10-14 21:25:39 +02:00
|
|
|
|
2017-05-24 20:25:38 +02:00
|
|
|
int max_background_jobs;
|
2016-10-14 21:25:39 +02:00
|
|
|
int base_background_compactions;
|
|
|
|
int max_background_compactions;
|
2016-11-02 23:22:13 +01:00
|
|
|
bool avoid_flush_during_shutdown;
|
2016-11-13 00:43:33 +01:00
|
|
|
uint64_t delayed_write_rate;
|
2016-11-15 07:45:16 +01:00
|
|
|
uint64_t max_total_wal_size;
|
2016-12-05 23:09:35 +01:00
|
|
|
uint64_t delete_obsolete_files_period_micros;
|
2017-03-21 06:50:56 +01:00
|
|
|
unsigned int stats_dump_period_sec;
|
2017-05-04 05:46:17 +02:00
|
|
|
int max_open_files;
|
2016-09-24 01:34:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace rocksdb
|