Remove createGlobal*Knobs functions

This commit is contained in:
sfc-gh-tclinkenbeard 2021-01-13 12:14:04 -08:00
parent b46384e1b8
commit e29ed3bf99
9 changed files with 2 additions and 33 deletions

View File

@ -3632,9 +3632,6 @@ int main(int argc, char* argv[]) {
args = NULL;
}
createGlobalFlowKnobs();
createGlobalClientKnobs();
for(auto k=knobs.begin(); k!=knobs.end(); ++k) {
try {
if (!globalFlowKnobs->setKnob(k->first, k->second) &&

View File

@ -2833,9 +2833,6 @@ struct CLIOptions {
return;
}
createGlobalFlowKnobs();
createGlobalClientKnobs();
for(auto k=knobs.begin(); k!=knobs.end(); ++k) {
try {
if (!globalFlowKnobs->setKnob(k->first, k->second) &&

View File

@ -246,11 +246,6 @@ void ClientKnobs::initialize(bool randomize) {
// clang-format on
}
void createGlobalClientKnobs() {
globalClientKnobs = std::make_unique<ClientKnobs>();
CLIENT_KNOBS = globalClientKnobs.get();
}
TEST_CASE("/fdbclient/knobs/initialize") {
// This test depends on TASKBUCKET_TIMEOUT_VERSIONS being defined as a constant multiple of CORE_VERSIONSPERSECOND
ClientKnobs clientKnobs;

View File

@ -234,6 +234,4 @@ public:
extern std::unique_ptr<ClientKnobs> globalClientKnobs;
extern ClientKnobs const* CLIENT_KNOBS;
void createGlobalClientKnobs();
#endif

View File

@ -22,8 +22,8 @@
#include "fdbrpc/Locality.h"
#include <cmath>
std::unique_ptr<ServerKnobs> globalServerKnobs{};
ServerKnobs const* SERVER_KNOBS = nullptr;
std::unique_ptr<ServerKnobs> globalServerKnobs = std::make_unique<ServerKnobs>();
ServerKnobs const* SERVER_KNOBS = globalServerKnobs.get();
#define init( knob, value ) initKnob( knob, value, #knob )
@ -697,8 +697,3 @@ void ServerKnobs::initialize(bool randomize, ClientKnobs* clientKnobs, bool isSi
clientKnobs->INIT_MID_SHARD_BYTES = MIN_SHARD_BYTES;
}
}
void createGlobalServerKnobs() {
globalServerKnobs = std::make_unique<ServerKnobs>();
SERVER_KNOBS = globalServerKnobs.get();
}

View File

@ -627,6 +627,4 @@ public:
extern std::unique_ptr<ServerKnobs> globalServerKnobs;
extern ServerKnobs const* SERVER_KNOBS;
void createGlobalServerKnobs();
#endif

View File

@ -1561,10 +1561,6 @@ int main(int argc, char* argv[]) {
enableBuggify(opts.buggifyEnabled, BuggifyType::General);
createGlobalFlowKnobs();
createGlobalClientKnobs();
createGlobalServerKnobs();
if (!globalServerKnobs->setKnob("log_directory", opts.logFolder)) ASSERT(false);
if (role != Simulation) {
if (!globalServerKnobs->setKnob("commit_batches_mem_bytes_hard_limit", std::to_string(opts.memLimit)))

View File

@ -346,8 +346,3 @@ void Knobs::trace() const {
for(auto &k : bool_knobs)
TraceEvent("Knob").detail("Name", k.first.c_str()).detail("Value", *k.second);
}
void createGlobalFlowKnobs() {
globalFlowKnobs = std::make_unique<FlowKnobs>();
FLOW_KNOBS = globalFlowKnobs.get();
}

View File

@ -256,6 +256,4 @@ public:
extern std::unique_ptr<FlowKnobs> globalFlowKnobs;
extern FlowKnobs const* FLOW_KNOBS;
void createGlobalFlowKnobs();
#endif