diff --git a/fdbclient/ClientKnobCollection.h b/fdbclient/ClientKnobCollection.h index 61ffe921df..8baaa92a61 100644 --- a/fdbclient/ClientKnobCollection.h +++ b/fdbclient/ClientKnobCollection.h @@ -49,4 +49,4 @@ public: bool isAtomic(std::string const& knobName) const override; }; -#endif // FDBCLIENT_CLIENTKNOBCCOLLECTION_H \ No newline at end of file +#endif // FDBCLIENT_CLIENTKNOBCCOLLECTION_H \ No newline at end of file diff --git a/fdbclient/IKnobCollection.h b/fdbclient/IKnobCollection.h index 006bc76f5c..266988d415 100644 --- a/fdbclient/IKnobCollection.h +++ b/fdbclient/IKnobCollection.h @@ -73,4 +73,4 @@ public: static ConfigMutationRef createClearMutation(Arena, KeyRef); }; -#endif // FDBCLIENT_IKNOBCOLLECTION_H \ No newline at end of file +#endif // FDBCLIENT_IKNOBCOLLECTION_H \ No newline at end of file diff --git a/fdbserver/KnobProtectiveGroups.h b/fdbserver/KnobProtectiveGroups.h index 3940d42fa0..05ef3636fa 100644 --- a/fdbserver/KnobProtectiveGroups.h +++ b/fdbserver/KnobProtectiveGroups.h @@ -29,31 +29,33 @@ // A list of knob key value pairs class KnobKeyValuePairs { public: - using container_t = std::unordered_map; + using container_t = std::unordered_map; + private: - // Here the knob value is directly stored, unlike KnobValue, for simplicity - container_t knobs; + // Here the knob value is directly stored, unlike KnobValue, for simplicity + container_t knobs; public: - // Sets a value for a given knob - void set(const std::string& name, const ParsedKnobValue value); + // Sets a value for a given knob + void set(const std::string& name, const ParsedKnobValue value); - // Gets a list of knobs for given type - const container_t& getKnobs() const; + // Gets a list of knobs for given type + const container_t& getKnobs() const; }; -// For knobs, temporarily change the values, the original values will be recovered +// For knobs, temporarily change the values, the original values will be recovered class KnobProtectiveGroup { - KnobKeyValuePairs overriddenKnobs; - KnobKeyValuePairs originalKnobs; + KnobKeyValuePairs overriddenKnobs; + KnobKeyValuePairs originalKnobs; - // Snapshots the current knob values base on those knob keys in overriddenKnobs - void snapshotOriginalKnobs(); + // Snapshots the current knob values base on those knob keys in overriddenKnobs + void snapshotOriginalKnobs(); + + void assignKnobs(const KnobKeyValuePairs& overrideKnobs); - void assignKnobs(const KnobKeyValuePairs& overrideKnobs); public: - KnobProtectiveGroup(const KnobKeyValuePairs& overridenKnobs_); - ~KnobProtectiveGroup(); + KnobProtectiveGroup(const KnobKeyValuePairs& overridenKnobs_); + ~KnobProtectiveGroup(); }; -#endif // FDBSERVER_KNOBPROTECTIVEGROUPS_H \ No newline at end of file +#endif // FDBSERVER_KNOBPROTECTIVEGROUPS_H \ No newline at end of file diff --git a/fdbserver/Knobs.h b/fdbserver/Knobs.h index aded40b516..19977b08dc 100644 --- a/fdbserver/Knobs.h +++ b/fdbserver/Knobs.h @@ -27,4 +27,4 @@ #define SERVER_KNOBS (&IKnobCollection::getGlobalKnobCollection().getServerKnobs()) -#endif // FDBSERVER_KNOBS_H \ No newline at end of file +#endif // FDBSERVER_KNOBS_H \ No newline at end of file