Add id to localconf file name
This commit is contained in:
parent
d20c3f7897
commit
852e0b4da0
|
@ -195,10 +195,11 @@ class LocalConfigurationImpl {
|
|||
public:
|
||||
LocalConfigurationImpl(ConfigClassSet const& configClasses,
|
||||
std::string const& dataFolder,
|
||||
std::map<Key, Value>&& manuallyOverriddenKnobs)
|
||||
std::map<Key, Value>&& manuallyOverriddenKnobs,
|
||||
UID id)
|
||||
: configClasses(configClasses), manuallyOverriddenKnobs(std::move(manuallyOverriddenKnobs)) {
|
||||
platform::createDirectory(dataFolder);
|
||||
kvStore = keyValueStoreMemory(joinPath(dataFolder, "localconf-"), UID{}, 500e6);
|
||||
kvStore = keyValueStoreMemory(joinPath(dataFolder, "localconf-" + id.toString()), id, 500e6);
|
||||
}
|
||||
|
||||
Future<Void> init() {
|
||||
|
@ -219,8 +220,9 @@ public:
|
|||
|
||||
LocalConfiguration::LocalConfiguration(ConfigClassSet const& configClasses,
|
||||
std::string const& dataFolder,
|
||||
std::map<Key, Value>&& manuallyOverriddenKnobs)
|
||||
: impl(std::make_unique<LocalConfigurationImpl>(configClasses, dataFolder, std::move(manuallyOverriddenKnobs))) {}
|
||||
std::map<Key, Value>&& manuallyOverriddenKnobs,
|
||||
UID id)
|
||||
: impl(std::make_unique<LocalConfigurationImpl>(configClasses, dataFolder, std::move(manuallyOverriddenKnobs), id)) {}
|
||||
|
||||
LocalConfiguration::~LocalConfiguration() = default;
|
||||
|
||||
|
|
|
@ -41,7 +41,8 @@ class LocalConfiguration {
|
|||
public:
|
||||
LocalConfiguration(ConfigClassSet const& configClasses,
|
||||
std::string const& dataFolder,
|
||||
std::map<Key, Value>&& manuallyOverriddenKnobs);
|
||||
std::map<Key, Value>&& manuallyOverriddenKnobs,
|
||||
UID id);
|
||||
~LocalConfiguration();
|
||||
Future<Void> init();
|
||||
TestKnobs const &getKnobs() const;
|
||||
|
|
|
@ -276,7 +276,7 @@ StringRef fileStoragePrefix = LiteralStringRef("storage-");
|
|||
StringRef fileLogDataPrefix = LiteralStringRef("log-");
|
||||
StringRef fileVersionedLogDataPrefix = LiteralStringRef("log2-");
|
||||
StringRef fileLogQueuePrefix = LiteralStringRef("logqueue-");
|
||||
StringRef localConfPrefix = LiteralStringRef("globalconf-");
|
||||
StringRef localConfPrefix = LiteralStringRef("localconf-");
|
||||
StringRef tlogQueueExtension = LiteralStringRef("fdq");
|
||||
|
||||
enum class FilesystemCheck {
|
||||
|
@ -2022,7 +2022,7 @@ ACTOR Future<Void> fdbd(Reference<ClusterConnectionFile> connFile,
|
|||
std::string whitelistBinPaths) {
|
||||
state vector<Future<Void>> actors;
|
||||
state Promise<Void> recoveredDiskFiles;
|
||||
state LocalConfiguration localConfig(ConfigClassSet{}, dataFolder, {});
|
||||
state LocalConfiguration localConfig(ConfigClassSet{}, dataFolder, {}, UID{});
|
||||
wait(localConfig.init());
|
||||
|
||||
actors.push_back(serveProtocolInfo());
|
||||
|
|
Loading…
Reference in New Issue