MCPcopy Create free account
hub / github.com/apple/foundationdb / logErrorWorker

Function logErrorWorker

fdbclient/BackupAgentBase.actor.cpp:381–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379static double lastErrorTime = 0;
380
381void logErrorWorker(Reference<ReadYourWritesTransaction> tr, Key keyErrors, std::string message) {
382 tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
383 tr->setOption(FDBTransactionOptions::LOCK_AWARE);
384 if (now() - lastErrorTime > CLIENT_KNOBS->BACKUP_ERROR_DELAY) {
385 TraceEvent("BA_LogError").detail("Key", keyErrors).detail("Message", message);
386 lastErrorTime = now();
387 }
388 tr->set(keyErrors, message);
389}
390
391Future<Void> logError(Database cx, Key keyErrors, const std::string& message) {
392 return runRYWTransaction(cx, [=](Reference<ReadYourWritesTransaction> tr) {

Callers 1

logErrorFunction · 0.85

Calls 5

nowFunction · 0.85
TraceEventClass · 0.85
detailMethod · 0.80
setOptionMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected