Log actor cancellation error to Client Transaction sampling records.

This commit is contained in:
Balachandar Namasivayam 2017-11-01 11:51:31 -07:00
parent 01a4888627
commit 1d95e1bfd6
1 changed files with 5 additions and 2 deletions

View File

@ -2485,6 +2485,9 @@ ACTOR static Future<Void> tryCommit( Database cx, Reference<TransactionLogInfo>
state double startTime;
if (info.debugID.present())
TraceEvent(interval.begin()).detail( "Parent", info.debugID.get() );
state CommitTransactionRequest ctReq(*req);
try {
Version v = wait( readVersion );
req->transaction.read_snapshot = v;
@ -2563,8 +2566,8 @@ ACTOR static Future<Void> tryCommit( Database cx, Reference<TransactionLogInfo>
} else {
if (e.code() != error_code_transaction_too_old && e.code() != error_code_not_committed && e.code() != error_code_database_locked)
TraceEvent(SevError, "tryCommitError").error(e);
if (e.code() != error_code_actor_cancelled && trLogInfo)
trLogInfo->addLog(FdbClientLogEvents::EventCommitError(startTime, static_cast<int>(e.code()), req));
if (trLogInfo)
trLogInfo->addLog(FdbClientLogEvents::EventCommitError(startTime, static_cast<int>(e.code()), &ctReq));
throw;
}
}