diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-09-18 13:53:27 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-09-20 18:39:54 -0400 |
commit | 2f58283213f8a80a37f78b6de2c527951306f2b5 (patch) | |
tree | 6caafc6b812908983bcfc648ad41542adf8a7b41 /src/mongo/s/commands | |
parent | 1b7b5200e158345d8818b00b039fccdccbed7aa2 (diff) | |
download | mongo-2f58283213f8a80a37f78b6de2c527951306f2b5.tar.gz |
SERVER-35707 Add helper for clearing participants, improve error messages, and update comments
Diffstat (limited to 'src/mongo/s/commands')
-rw-r--r-- | src/mongo/s/commands/strategy.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp index 0a36636b1fd..8e1f5785915 100644 --- a/src/mongo/s/commands/strategy.cpp +++ b/src/mongo/s/commands/strategy.cpp @@ -413,7 +413,8 @@ void runCommand(OperationContext* opCtx, str::stream() << "Transaction " << opCtx->getTxnNumber() << " was aborted after " << kMaxNumStaleVersionRetries - << " failed retries", + << " failed retries. The latest attempt failed with: " + << ex.toStatus(), canRetry); } @@ -435,7 +436,8 @@ void runCommand(OperationContext* opCtx, str::stream() << "Transaction " << opCtx->getTxnNumber() << " was aborted after " << kMaxNumStaleVersionRetries - << " failed retries", + << " failed retries. The latest attempt failed with: " + << ex.toStatus(), canRetry); } @@ -443,7 +445,7 @@ void runCommand(OperationContext* opCtx, continue; } throw; - } catch (const ExceptionForCat<ErrorCategory::SnapshotError>&) { + } catch (const ExceptionForCat<ErrorCategory::SnapshotError>& ex) { // Simple retry on any type of snapshot error. // Update transaction tracking state for a possible retry. Throws if the transaction @@ -455,7 +457,8 @@ void runCommand(OperationContext* opCtx, str::stream() << "Transaction " << opCtx->getTxnNumber() << " was aborted after " << kMaxNumStaleVersionRetries - << " failed retries", + << " failed retries. The latest attempt failed with: " + << ex.toStatus(), canRetry); } |