clean up some comments and debug changes

This commit is contained in:
Jon Fu 2022-02-02 14:03:32 -05:00
parent 91ecc4104d
commit d8e7fea421
7 changed files with 12 additions and 16 deletions

View File

@ -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

View File

@ -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"

View File

@ -5799,7 +5799,6 @@ void Transaction::setOption(FDBTransactionOptions::Option option, Optional<Strin
break;
case FDBTransactionOptions::USE_GRV_CACHE:
// Needs to be a no-op if ratekeeper is throttling
validateOptionValueNotPresent(value);
trState->options.useGrvCache = true;
break;

View File

@ -677,7 +677,7 @@ ACTOR Future<Void> sendGrvReplies(Future<GetReadVersionReply> replyFuture,
stats->lastTxnThrottled = true;
stats->throttleStartTime = now();
}
} else { // reply.timeThrottled <= CLIENT_KNOBS->GRV_THROTTLING_THRESHOLD
} else {
TraceEvent("DebugGrvProxyNotThrottled");
stats->lastTxnThrottled = false;
}

View File

@ -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));

View File

@ -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<DynamicEventMetric>(MetricNameRef());

View File

@ -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() {