Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use inline variable in header files #1407

Merged
merged 1 commit into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/storage/include/storage/backupable.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace storage {

const std::string DEFAULT_BK_PATH = "dump"; // Default backup root dir
const std::string DEFAULT_RS_PATH = "db"; // Default restore root dir
inline const std::string DEFAULT_BK_PATH = "dump"; // Default backup root dir
inline const std::string DEFAULT_RS_PATH = "db"; // Default restore root dir

// Arguments which will used by BackupSave Thread
// p_engine for BackupEngine handler
Expand Down
32 changes: 16 additions & 16 deletions src/storage/include/storage/storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@

namespace storage {

const double ZSET_SCORE_MAX = std::numeric_limits<double>::max();
const double ZSET_SCORE_MIN = std::numeric_limits<double>::lowest();

const std::string PROPERTY_TYPE_ROCKSDB_MEMTABLE = "rocksdb.cur-size-all-mem-tables";
const std::string PROPERTY_TYPE_ROCKSDB_TABLE_READER = "rocksdb.estimate-table-readers-mem";
const std::string PROPERTY_TYPE_ROCKSDB_BACKGROUND_ERRORS = "rocksdb.background-errors";

const std::string ALL_DB = "all";
const std::string STRINGS_DB = "strings";
const std::string HASHES_DB = "hashes";
const std::string LISTS_DB = "lists";
const std::string ZSETS_DB = "zsets";
const std::string SETS_DB = "sets";

const size_t BATCH_DELETE_LIMIT = 100;
const size_t COMPACT_THRESHOLD_COUNT = 2000;
inline constexpr double ZSET_SCORE_MAX = std::numeric_limits<double>::max();
inline constexpr double ZSET_SCORE_MIN = std::numeric_limits<double>::lowest();

inline const std::string PROPERTY_TYPE_ROCKSDB_MEMTABLE = "rocksdb.cur-size-all-mem-tables";
inline const std::string PROPERTY_TYPE_ROCKSDB_TABLE_READER = "rocksdb.estimate-table-readers-mem";
inline const std::string PROPERTY_TYPE_ROCKSDB_BACKGROUND_ERRORS = "rocksdb.background-errors";

inline const std::string ALL_DB = "all";
inline const std::string STRINGS_DB = "strings";
inline const std::string HASHES_DB = "hashes";
inline const std::string LISTS_DB = "lists";
inline const std::string ZSETS_DB = "zsets";
inline const std::string SETS_DB = "sets";

inline constexpr size_t BATCH_DELETE_LIMIT = 100;
inline constexpr size_t COMPACT_THRESHOLD_COUNT = 2000;

using Options = rocksdb::Options;
using BlockBasedTableOptions = rocksdb::BlockBasedTableOptions;
Expand Down