summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2018-09-18 13:53:27 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2018-09-20 18:39:54 -0400
commit2f58283213f8a80a37f78b6de2c527951306f2b5 (patch)
tree6caafc6b812908983bcfc648ad41542adf8a7b41 /src/mongo/s/commands
parent1b7b5200e158345d8818b00b039fccdccbed7aa2 (diff)
downloadmongo-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.cpp11
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);
}