diff --git a/fdbclient/ClientKnobs.h b/fdbclient/ClientKnobs.h index b60c902197..9cf51106b0 100644 --- a/fdbclient/ClientKnobs.h +++ b/fdbclient/ClientKnobs.h @@ -124,7 +124,6 @@ public: double MAX_PROXY_CONTACT_LAG; // The upper bound in seconds for how often we want a response from the GRV proxies double DEBUG_USE_GRV_CACHE_CHANCE; // Debug setting to change the chance for a regular GRV request to use the cache bool FORCE_GRV_CACHE_OFF; // Panic button to turn off cache. Holds priority over other options. - // should these be server knobs? double GRV_CACHE_RK_COOLDOWN; // Required number of seconds to pass after throttling to re-allow cache use int GRV_THROTTLING_THRESHOLD; // Number of iterations spent in the request queue loop which is considered throttling double GRV_SUSTAINED_THROTTLING_THRESHOLD; // If ALL GRV requests have been throttled in the last number of seconds diff --git a/fdbclient/DatabaseContext.h b/fdbclient/DatabaseContext.h index 88d4f6ccf1..e64a9605d2 100644 --- a/fdbclient/DatabaseContext.h +++ b/fdbclient/DatabaseContext.h @@ -33,7 +33,6 @@ #include "fdbclient/KeyRangeMap.h" #include "fdbclient/CommitProxyInterface.h" #include "fdbclient/SpecialKeySpace.actor.h" -#include "fdbclient/Notified.h" #include "fdbrpc/QueueModel.h" #include "fdbrpc/MultiInterface.h" #include "flow/TDMetric.actor.h" diff --git a/fdbclient/NativeAPI.actor.cpp b/fdbclient/NativeAPI.actor.cpp index 0d503f82a8..486a0b2b6f 100644 --- a/fdbclient/NativeAPI.actor.cpp +++ b/fdbclient/NativeAPI.actor.cpp @@ -5799,7 +5799,6 @@ void Transaction::setOption(FDBTransactionOptions::Option option, Optionaloptions.useGrvCache = true; break; diff --git a/fdbserver/GrvProxyServer.actor.cpp b/fdbserver/GrvProxyServer.actor.cpp index c198917e6c..150eef0d00 100644 --- a/fdbserver/GrvProxyServer.actor.cpp +++ b/fdbserver/GrvProxyServer.actor.cpp @@ -677,7 +677,7 @@ ACTOR Future sendGrvReplies(Future replyFuture, stats->lastTxnThrottled = true; stats->throttleStartTime = now(); } - } else { // reply.timeThrottled <= CLIENT_KNOBS->GRV_THROTTLING_THRESHOLD + } else { TraceEvent("DebugGrvProxyNotThrottled"); stats->lastTxnThrottled = false; } diff --git a/fdbserver/workloads/Cycle.actor.cpp b/fdbserver/workloads/Cycle.actor.cpp index d4de002a9e..87c477eab4 100644 --- a/fdbserver/workloads/Cycle.actor.cpp +++ b/fdbserver/workloads/Cycle.actor.cpp @@ -125,7 +125,6 @@ struct CycleWorkload : TestWorkload { int r4 = self->fromValue(v3.get()); tr.clear(self->key(r)); //< Shouldn't have an effect, but will break with wrong ordering - tr.setOption(FDBTransactionOptions::USE_GRV_CACHE); tr.set(self->key(r), self->value(r3)); tr.set(self->key(r2), self->value(r4)); tr.set(self->key(r3), self->value(r2)); diff --git a/flow/Trace.cpp b/flow/Trace.cpp index ab6e16de44..7056f00042 100644 --- a/flow/Trace.cpp +++ b/flow/Trace.cpp @@ -911,16 +911,16 @@ bool TraceEvent::init() { enabled = enabled && (!g_network || severity >= FLOW_KNOBS->MIN_TRACE_SEVERITY); // Backstop to throttle very spammy trace events - // if (enabled && g_network && !g_network->isSimulated() && severity > SevDebug && isNetworkThread()) { - // if (traceEventThrottlerCache->isAboveThreshold(StringRef((uint8_t*)type, strlen(type)))) { - // enabled = false; - // TraceEvent(SevWarnAlways, std::string(TRACE_EVENT_THROTTLE_STARTING_TYPE).append(type).c_str()) - // .suppressFor(5); - // } else { - // traceEventThrottlerCache->addAndExpire( - // StringRef((uint8_t*)type, strlen(type)), 1, now() + FLOW_KNOBS->TRACE_EVENT_THROTTLER_SAMPLE_EXPIRY); - // } - // } + if (enabled && g_network && !g_network->isSimulated() && severity > SevDebug && isNetworkThread()) { + if (traceEventThrottlerCache->isAboveThreshold(StringRef((uint8_t*)type, strlen(type)))) { + enabled = false; + TraceEvent(SevWarnAlways, std::string(TRACE_EVENT_THROTTLE_STARTING_TYPE).append(type).c_str()) + .suppressFor(5); + } else { + traceEventThrottlerCache->addAndExpire( + StringRef((uint8_t*)type, strlen(type)), 1, now() + FLOW_KNOBS->TRACE_EVENT_THROTTLER_SAMPLE_EXPIRY); + } + } if (enabled) { tmpEventMetric = std::make_unique(MetricNameRef()); diff --git a/flow/Trace.h b/flow/Trace.h index 58e58be983..52dc94aab7 100644 --- a/flow/Trace.h +++ b/flow/Trace.h @@ -33,7 +33,7 @@ #include "flow/Error.h" #include "flow/ITrace.h" -#define TRACE_DEFAULT_ROLL_SIZE (10 << 24) +#define TRACE_DEFAULT_ROLL_SIZE (10 << 20) #define TRACE_DEFAULT_MAX_LOGS_SIZE (10 * TRACE_DEFAULT_ROLL_SIZE) inline int fastrand() {