diff --git a/fdbbackup/backup.actor.cpp b/fdbbackup/backup.actor.cpp index 91749522ef..b0fd57f84f 100644 --- a/fdbbackup/backup.actor.cpp +++ b/fdbbackup/backup.actor.cpp @@ -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) && diff --git a/fdbcli/fdbcli.actor.cpp b/fdbcli/fdbcli.actor.cpp index 041a89a5e9..1a79796e32 100644 --- a/fdbcli/fdbcli.actor.cpp +++ b/fdbcli/fdbcli.actor.cpp @@ -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) && diff --git a/fdbclient/Knobs.cpp b/fdbclient/Knobs.cpp index 3996fc6f7b..c99d8e84ef 100644 --- a/fdbclient/Knobs.cpp +++ b/fdbclient/Knobs.cpp @@ -246,11 +246,6 @@ void ClientKnobs::initialize(bool randomize) { // clang-format on } -void createGlobalClientKnobs() { - globalClientKnobs = std::make_unique(); - 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; diff --git a/fdbclient/Knobs.h b/fdbclient/Knobs.h index cdf55c3d16..9aa8872bad 100644 --- a/fdbclient/Knobs.h +++ b/fdbclient/Knobs.h @@ -234,6 +234,4 @@ public: extern std::unique_ptr globalClientKnobs; extern ClientKnobs const* CLIENT_KNOBS; -void createGlobalClientKnobs(); - #endif diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp index a0e51bb3c9..cc498eab40 100644 --- a/fdbserver/Knobs.cpp +++ b/fdbserver/Knobs.cpp @@ -22,8 +22,8 @@ #include "fdbrpc/Locality.h" #include -std::unique_ptr globalServerKnobs{}; -ServerKnobs const* SERVER_KNOBS = nullptr; +std::unique_ptr globalServerKnobs = std::make_unique(); +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(); - SERVER_KNOBS = globalServerKnobs.get(); -} diff --git a/fdbserver/Knobs.h b/fdbserver/Knobs.h index 6a641fbb04..e44e62e0d2 100644 --- a/fdbserver/Knobs.h +++ b/fdbserver/Knobs.h @@ -627,6 +627,4 @@ public: extern std::unique_ptr globalServerKnobs; extern ServerKnobs const* SERVER_KNOBS; -void createGlobalServerKnobs(); - #endif diff --git a/fdbserver/fdbserver.actor.cpp b/fdbserver/fdbserver.actor.cpp index 12db47f977..fecc62e511 100644 --- a/fdbserver/fdbserver.actor.cpp +++ b/fdbserver/fdbserver.actor.cpp @@ -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))) diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp index 91c1d817f9..33e0222366 100644 --- a/flow/Knobs.cpp +++ b/flow/Knobs.cpp @@ -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(); - FLOW_KNOBS = globalFlowKnobs.get(); -} diff --git a/flow/Knobs.h b/flow/Knobs.h index ba843d4c19..d6524d72f0 100644 --- a/flow/Knobs.h +++ b/flow/Knobs.h @@ -256,6 +256,4 @@ public: extern std::unique_ptr globalFlowKnobs; extern FlowKnobs const* FLOW_KNOBS; -void createGlobalFlowKnobs(); - #endif