Change TLog pull async data warning timeout

This commit is contained in:
Zhe Wu 2023-01-11 19:36:00 -08:00
parent 087d37d10b
commit 359b3a11e7
1 changed files with 5 additions and 1 deletions

View File

@ -2816,6 +2816,8 @@ ACTOR Future<Void> pullAsyncData(TLogData* self,
}
while (!endVersion.present() || logData->version.get() < endVersion.get()) {
// When we just processed some data, we reset the warning start time.
state double lastPullAsyncDataWarningTime = now();
loop {
choose {
when(wait(r ? r->getMore(TaskPriority::TLogCommit) : Never())) {
@ -2829,10 +2831,12 @@ ACTOR Future<Void> pullAsyncData(TLogData* self,
}
dbInfoChange = logData->logSystem->onChange();
}
when(wait(delay(SERVER_KNOBS->TLOG_PULL_ASYNC_DATA_WARNING_TIMEOUT_SECS))) {
when(wait(delay(lastPullAsyncDataWarningTime + SERVER_KNOBS->TLOG_PULL_ASYNC_DATA_WARNING_TIMEOUT_SECS -
now()))) {
TraceEvent(SevWarn, "TLogPullAsyncDataSlow", logData->logId)
.detail("Elapsed", now() - startTime)
.detail("Version", logData->version.get());
lastPullAsyncDataWarningTime = now();
}
}
}