Skip to content

Commit

Permalink
fix: Use inline variable (OpenAtomFoundation#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
4kangjc authored Apr 29, 2023
1 parent 84f6cfc commit 9905576
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
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

0 comments on commit 9905576

Please sign in to comment.