Merge pull request #5332 from sfc-gh-ljoswiak/fixes/global-config-traces
Remove hot TraceEvents from GlobalConfig
This commit is contained in:
commit
2a97a55f0b
|
@ -77,7 +77,7 @@ void GlobalConfig::trigger(KeyRef key, std::function<void(std::optional<std::any
|
|||
}
|
||||
|
||||
void GlobalConfig::insert(KeyRef key, ValueRef value) {
|
||||
TraceEvent(SevInfo, "GlobalConfig_Insert").detail("Key", key).detail("Value", value);
|
||||
// TraceEvent(SevInfo, "GlobalConfig_Insert").detail("Key", key).detail("Value", value);
|
||||
data.erase(key);
|
||||
|
||||
Arena arena(key.expectedSize() + value.expectedSize());
|
||||
|
@ -113,7 +113,7 @@ void GlobalConfig::erase(Key key) {
|
|||
}
|
||||
|
||||
void GlobalConfig::erase(KeyRangeRef range) {
|
||||
TraceEvent(SevInfo, "GlobalConfig_Erase").detail("Range", range);
|
||||
// TraceEvent(SevInfo, "GlobalConfig_Erase").detail("Range", range);
|
||||
auto it = data.begin();
|
||||
while (it != data.end()) {
|
||||
if (range.contains(it->first)) {
|
||||
|
@ -167,7 +167,7 @@ ACTOR Future<Void> GlobalConfig::migrate(GlobalConfig* self) {
|
|||
// attempt this migration at the same time, sometimes resulting in
|
||||
// aborts due to conflicts. Purposefully avoid retrying, making this
|
||||
// migration best-effort.
|
||||
TraceEvent(SevInfo, "GlobalConfigMigrationError").detail("What", e.what());
|
||||
TraceEvent(SevInfo, "GlobalConfig_MigrationError").detail("What", e.what());
|
||||
}
|
||||
|
||||
return Void();
|
||||
|
@ -176,7 +176,7 @@ ACTOR Future<Void> GlobalConfig::migrate(GlobalConfig* self) {
|
|||
// Updates local copy of global configuration by reading the entire key-range
|
||||
// from storage.
|
||||
ACTOR Future<Void> GlobalConfig::refresh(GlobalConfig* self) {
|
||||
TraceEvent trace(SevInfo, "GlobalConfig_Refresh");
|
||||
// TraceEvent trace(SevInfo, "GlobalConfig_Refresh");
|
||||
self->erase(KeyRangeRef(""_sr, "\xff"_sr));
|
||||
|
||||
Transaction tr(self->cx);
|
||||
|
|
|
@ -108,7 +108,6 @@ public:
|
|||
// the key.
|
||||
template <typename T, typename std::enable_if<std::is_arithmetic<T>{}, bool>::type = true>
|
||||
const T get(KeyRef name, T defaultVal) {
|
||||
TraceEvent(SevInfo, "GlobalConfig_Get").detail("Key", name);
|
||||
try {
|
||||
auto configValue = get(name);
|
||||
if (configValue.isValid()) {
|
||||
|
|
Loading…
Reference in New Issue