Fix initialization order of DBOptions and kHostnameForDbHostId (#7702)
Summary: Fix initialization order of DBOptions and kHostnameForDbHostId by making the initialization of the latter static rather than dynamic. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7702 Reviewed By: ajkr Differential Revision: D25111633 Pulled By: anand1976 fbshipit-source-id: 7afad834a66e40bcd8694a43b40d378695212224
This commit is contained in:
parent
46923e5ca4
commit
a5a5be4b4c
@ -349,7 +349,7 @@ struct DbPath {
|
||||
DbPath(const std::string& p, uint64_t t) : path(p), target_size(t) {}
|
||||
};
|
||||
|
||||
static const std::string kHostnameForDbHostId = "__hostname__";
|
||||
extern const char* kHostnameForDbHostId;
|
||||
|
||||
struct DBOptions {
|
||||
// The function recovers options to the option as in version 4.6.
|
||||
|
@ -41,6 +41,7 @@ extern const uint64_t kPlainTableMagicNumber;
|
||||
const uint64_t kLegacyPlainTableMagicNumber = 0;
|
||||
const uint64_t kPlainTableMagicNumber = 0;
|
||||
#endif
|
||||
const char* kHostnameForDbHostId = "__hostname__";
|
||||
|
||||
bool ShouldReportDetailedTime(Env* env, Statistics* stats) {
|
||||
return env != nullptr && stats != nullptr &&
|
||||
|
Loading…
Reference in New Issue
Block a user