add debug traces for testing
This commit is contained in:
parent
7492b755d8
commit
6f1c3d50bb
|
@ -5968,9 +5968,11 @@ ACTOR Future<Version> extractReadVersion(Reference<TransactionState> trState,
|
|||
trState->cx->lastProxyRequestTime = trState->startTime;
|
||||
trState->cx->updateCachedReadVersion(trState->startTime, rep.version);
|
||||
if (rep.rkBatchThrottled) {
|
||||
TraceEvent("DebugGrvLastRkBatchThrottled").detail("ReplyTime", replyTime);
|
||||
trState->cx->lastRkBatchThrottleTime = replyTime;
|
||||
}
|
||||
if (rep.rkDefaultThrottled) {
|
||||
TraceEvent("DebugGrvLastRkDefaultThrottled").detail("ReplyTime", replyTime);
|
||||
trState->cx->lastRkDefaultThrottleTime = replyTime;
|
||||
}
|
||||
trState->cx->GRVLatencies.addSample(latency);
|
||||
|
|
|
@ -659,6 +659,7 @@ ACTOR Future<Void> sendGrvReplies(Future<GetReadVersionReply> replyFuture,
|
|||
if (stats->lastBatchQueueThrottled) {
|
||||
// Check if this throttling has been sustained for a certain amount of time to avoid false positives
|
||||
if (now() - stats->batchThrottleStartTime > CLIENT_KNOBS->GRV_SUSTAINED_THROTTLING_THRESHOLD) {
|
||||
TraceEvent("DebugGrvProxyBatchThrottled").detail("StartTime", stats->batchThrottleStartTime);
|
||||
reply.rkBatchThrottled = true;
|
||||
}
|
||||
}
|
||||
|
@ -668,6 +669,7 @@ ACTOR Future<Void> sendGrvReplies(Future<GetReadVersionReply> replyFuture,
|
|||
// Consider the batch queue throttled if the default is throttled
|
||||
// to deal with a potential lull in activity for that priority.
|
||||
// Avoids mistakenly thinking batch is unthrottled while default is still throttled.
|
||||
TraceEvent("DebugGrvProxyDefaultThrottled").detail("StartTime", stats->defaultThrottleStartTime);
|
||||
reply.rkBatchThrottled = true;
|
||||
reply.rkDefaultThrottled = true;
|
||||
}
|
||||
|
@ -869,12 +871,14 @@ ACTOR static Future<Void> transactionStarter(GrvProxyInterface proxy,
|
|||
requestsToStart++;
|
||||
}
|
||||
if (!batchQueue.empty()) {
|
||||
TraceEvent("DebugGrvProxyBatchQueueEmpty").detail("Size", batchQueue.size());
|
||||
grvProxyData->stats.lastBatchQueueThrottled = true;
|
||||
grvProxyData->stats.batchThrottleStartTime = now();
|
||||
} else {
|
||||
grvProxyData->stats.lastBatchQueueThrottled = false;
|
||||
}
|
||||
if (!defaultQueue.empty()) {
|
||||
TraceEvent("DebugGrvProxyDefaultQueueEmpty").detail("Size", defaultQueue.size());
|
||||
grvProxyData->stats.lastDefaultQueueThrottled = true;
|
||||
grvProxyData->stats.defaultThrottleStartTime = now();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue