From 80c6048a01abb641fbfa54b9b33bf83486ffcbf6 Mon Sep 17 00:00:00 2001 From: Lukas Joswiak Date: Sat, 20 Feb 2021 00:43:54 -0800 Subject: [PATCH] Naming fixes --- fdbclient/GlobalConfig.actor.cpp | 2 +- fdbclient/SpecialKeySpace.actor.cpp | 4 +++- fdbclient/SystemData.cpp | 6 +++--- fdbclient/SystemData.h | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fdbclient/GlobalConfig.actor.cpp b/fdbclient/GlobalConfig.actor.cpp index b411e06f56..c51429a694 100644 --- a/fdbclient/GlobalConfig.actor.cpp +++ b/fdbclient/GlobalConfig.actor.cpp @@ -103,7 +103,7 @@ ACTOR Future GlobalConfig::refresh(GlobalConfig* self) { Transaction tr(self->cx); Standalone result = wait(tr.getRange(globalConfigDataKeys, CLIENT_KNOBS->TOO_MANY)); for (const auto& kv : result) { - KeyRef systemKey = kv.key.removePrefix(globalConfigDataPrefix); + KeyRef systemKey = kv.key.removePrefix(globalConfigKeysPrefix); self->insert(systemKey, kv.value); } return Void(); diff --git a/fdbclient/SpecialKeySpace.actor.cpp b/fdbclient/SpecialKeySpace.actor.cpp index ea577777e5..c84b4a5d42 100644 --- a/fdbclient/SpecialKeySpace.actor.cpp +++ b/fdbclient/SpecialKeySpace.actor.cpp @@ -1449,7 +1449,7 @@ ACTOR Future> globalConfigCommitActor(GlobalConfigImpl* gl state RangeMap>, KeyRangeRef>::iterator iter = ranges.begin(); while (iter != ranges.end()) { Key bareKey = iter->begin().removePrefix(globalConfig->getKeyRange().begin); - Key systemKey = bareKey.withPrefix(globalConfigDataPrefix); + Key systemKey = bareKey.withPrefix(globalConfigKeysPrefix); std::pair> entry = iter->value(); if (entry.first) { if (entry.second.present()) { @@ -1498,6 +1498,8 @@ void GlobalConfigImpl::clear(ReadYourWritesTransaction* ryw, const KeyRef& key) ryw->getSpecialKeySpaceWriteMap().insert(key, std::make_pair(true, Optional())); } +TracingOptionsImpl::TracingOptionsImpl(KeyRangeRef kr) : SpecialKeyRangeRWImpl(kr) {} + Future> TracingOptionsImpl::getRange(ReadYourWritesTransaction* ryw, KeyRangeRef kr) const { Standalone result; diff --git a/fdbclient/SystemData.cpp b/fdbclient/SystemData.cpp index aaf115e3b8..785a42828b 100644 --- a/fdbclient/SystemData.cpp +++ b/fdbclient/SystemData.cpp @@ -632,11 +632,11 @@ std::string encodeFailedServersKey(AddressExclusion const& addr) { return failedServersPrefix.toString() + addr.toString(); } -const KeyRangeRef globalConfigKeys( LiteralStringRef("\xff/globalConfig/"), LiteralStringRef("\xff/globalConfig0") ); -const KeyRef globalConfigPrefix = globalConfigKeys.begin; +// const KeyRangeRef globalConfigKeys( LiteralStringRef("\xff/globalConfig/"), LiteralStringRef("\xff/globalConfig0") ); +// const KeyRef globalConfigPrefix = globalConfigKeys.begin; const KeyRangeRef globalConfigDataKeys( LiteralStringRef("\xff/globalConfig/k/"), LiteralStringRef("\xff/globalConfig/k0") ); -const KeyRef globalConfigDataPrefix = globalConfigDataKeys.begin; +const KeyRef globalConfigKeysPrefix = globalConfigDataKeys.begin; const KeyRangeRef globalConfigHistoryKeys( LiteralStringRef("\xff/globalConfig/h/"), LiteralStringRef("\xff/globalConfig/h0") ); const KeyRef globalConfigHistoryPrefix = globalConfigHistoryKeys.begin; diff --git a/fdbclient/SystemData.h b/fdbclient/SystemData.h index 15117a867e..489da42f83 100644 --- a/fdbclient/SystemData.h +++ b/fdbclient/SystemData.h @@ -232,14 +232,14 @@ std::string encodeFailedServersKey(AddressExclusion const&); // "\xff/globalConfig/[[option]]" := "value" // An umbrella prefix for global configuration data synchronized to all nodes. -extern const KeyRangeRef globalConfigData; -extern const KeyRef globalConfigDataPrefix; +// extern const KeyRangeRef globalConfigData; +// extern const KeyRef globalConfigDataPrefix; // "\xff/globalConfig/k/[[key]]" := "value" // Key-value pairs that have been set. The range this keyspace represents // contains all globally configured options. extern const KeyRangeRef globalConfigDataKeys; -extern const KeyRef globalConfigDataPrefix; +extern const KeyRef globalConfigKeysPrefix; // "\xff/globalConfig/h/[[version]]" := "value" // Maps a commit version to a list of mutations made to the global