clean up some comments and debug changes
This commit is contained in:
parent
91ecc4104d
commit
d8e7fea421
|
@ -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 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
|
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.
|
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
|
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
|
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
|
double GRV_SUSTAINED_THROTTLING_THRESHOLD; // If ALL GRV requests have been throttled in the last number of seconds
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "fdbclient/KeyRangeMap.h"
|
#include "fdbclient/KeyRangeMap.h"
|
||||||
#include "fdbclient/CommitProxyInterface.h"
|
#include "fdbclient/CommitProxyInterface.h"
|
||||||
#include "fdbclient/SpecialKeySpace.actor.h"
|
#include "fdbclient/SpecialKeySpace.actor.h"
|
||||||
#include "fdbclient/Notified.h"
|
|
||||||
#include "fdbrpc/QueueModel.h"
|
#include "fdbrpc/QueueModel.h"
|
||||||
#include "fdbrpc/MultiInterface.h"
|
#include "fdbrpc/MultiInterface.h"
|
||||||
#include "flow/TDMetric.actor.h"
|
#include "flow/TDMetric.actor.h"
|
||||||
|
|
|
@ -5799,7 +5799,6 @@ void Transaction::setOption(FDBTransactionOptions::Option option, Optional<Strin
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FDBTransactionOptions::USE_GRV_CACHE:
|
case FDBTransactionOptions::USE_GRV_CACHE:
|
||||||
// Needs to be a no-op if ratekeeper is throttling
|
|
||||||
validateOptionValueNotPresent(value);
|
validateOptionValueNotPresent(value);
|
||||||
trState->options.useGrvCache = true;
|
trState->options.useGrvCache = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -677,7 +677,7 @@ ACTOR Future<Void> sendGrvReplies(Future<GetReadVersionReply> replyFuture,
|
||||||
stats->lastTxnThrottled = true;
|
stats->lastTxnThrottled = true;
|
||||||
stats->throttleStartTime = now();
|
stats->throttleStartTime = now();
|
||||||
}
|
}
|
||||||
} else { // reply.timeThrottled <= CLIENT_KNOBS->GRV_THROTTLING_THRESHOLD
|
} else {
|
||||||
TraceEvent("DebugGrvProxyNotThrottled");
|
TraceEvent("DebugGrvProxyNotThrottled");
|
||||||
stats->lastTxnThrottled = false;
|
stats->lastTxnThrottled = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,6 @@ struct CycleWorkload : TestWorkload {
|
||||||
int r4 = self->fromValue(v3.get());
|
int r4 = self->fromValue(v3.get());
|
||||||
|
|
||||||
tr.clear(self->key(r)); //< Shouldn't have an effect, but will break with wrong ordering
|
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(r), self->value(r3));
|
||||||
tr.set(self->key(r2), self->value(r4));
|
tr.set(self->key(r2), self->value(r4));
|
||||||
tr.set(self->key(r3), self->value(r2));
|
tr.set(self->key(r3), self->value(r2));
|
||||||
|
|
|
@ -911,16 +911,16 @@ bool TraceEvent::init() {
|
||||||
enabled = enabled && (!g_network || severity >= FLOW_KNOBS->MIN_TRACE_SEVERITY);
|
enabled = enabled && (!g_network || severity >= FLOW_KNOBS->MIN_TRACE_SEVERITY);
|
||||||
|
|
||||||
// Backstop to throttle very spammy trace events
|
// Backstop to throttle very spammy trace events
|
||||||
// if (enabled && g_network && !g_network->isSimulated() && severity > SevDebug && isNetworkThread()) {
|
if (enabled && g_network && !g_network->isSimulated() && severity > SevDebug && isNetworkThread()) {
|
||||||
// if (traceEventThrottlerCache->isAboveThreshold(StringRef((uint8_t*)type, strlen(type)))) {
|
if (traceEventThrottlerCache->isAboveThreshold(StringRef((uint8_t*)type, strlen(type)))) {
|
||||||
// enabled = false;
|
enabled = false;
|
||||||
// TraceEvent(SevWarnAlways, std::string(TRACE_EVENT_THROTTLE_STARTING_TYPE).append(type).c_str())
|
TraceEvent(SevWarnAlways, std::string(TRACE_EVENT_THROTTLE_STARTING_TYPE).append(type).c_str())
|
||||||
// .suppressFor(5);
|
.suppressFor(5);
|
||||||
// } else {
|
} else {
|
||||||
// traceEventThrottlerCache->addAndExpire(
|
traceEventThrottlerCache->addAndExpire(
|
||||||
// StringRef((uint8_t*)type, strlen(type)), 1, now() + FLOW_KNOBS->TRACE_EVENT_THROTTLER_SAMPLE_EXPIRY);
|
StringRef((uint8_t*)type, strlen(type)), 1, now() + FLOW_KNOBS->TRACE_EVENT_THROTTLER_SAMPLE_EXPIRY);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
tmpEventMetric = std::make_unique<DynamicEventMetric>(MetricNameRef());
|
tmpEventMetric = std::make_unique<DynamicEventMetric>(MetricNameRef());
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "flow/Error.h"
|
#include "flow/Error.h"
|
||||||
#include "flow/ITrace.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)
|
#define TRACE_DEFAULT_MAX_LOGS_SIZE (10 * TRACE_DEFAULT_ROLL_SIZE)
|
||||||
|
|
||||||
inline int fastrand() {
|
inline int fastrand() {
|
||||||
|
|
Loading…
Reference in New Issue