Merge pull request #4661 from RenxuanW/rk

Add TraceEvent to see whether RateKeeper is too busy to get SS list or fails to get SS list.
This commit is contained in:
Renxuan Wang 2021-04-27 10:46:47 -07:00 committed by GitHub
commit c9cb96b59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -737,6 +737,10 @@ ACTOR Future<Void> monitorServerListChange(
loop {
try {
if (now() - self->lastSSListFetchedTimestamp > 2 * SERVER_KNOBS->SERVER_LIST_DELAY) {
TraceEvent(SevWarnAlways, "RatekeeperGetSSListLongLatency", self->id)
.detail("Latency", now() - self->lastSSListFetchedTimestamp);
}
tr.setOption(FDBTransactionOptions::PRIORITY_SYSTEM_IMMEDIATE);
vector<std::pair<StorageServerInterface, ProcessClass>> results = wait(getServerListAndProcessClasses(&tr));
self->lastSSListFetchedTimestamp = now();
@ -764,6 +768,7 @@ ACTOR Future<Void> monitorServerListChange(
tr = Transaction(self->db);
wait(delay(SERVER_KNOBS->SERVER_LIST_DELAY));
} catch (Error& e) {
TraceEvent("RatekeeperGetSSListError", self->id).error(e).suppressFor(1.0);
wait(tr.onError(e));
}
}