summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/distinct.cpp
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2019-05-29 12:31:01 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2019-05-29 15:42:23 -0400
commitd0194cc5133c4e71868156320fee86f0166e0f7e (patch)
treedb4f1495609ea28fd61cb3f7326eed94f6151b6a /src/mongo/db/commands/distinct.cpp
parentd0501d6c8497aa110f39fba726678cab4e47bafc (diff)
downloadmongo-d0194cc5133c4e71868156320fee86f0166e0f7e.tar.gz
SERVER-41239 Link to recommended alternative in error message for distinct on sharded coll in txn
Diffstat (limited to 'src/mongo/db/commands/distinct.cpp')
-rw-r--r--src/mongo/db/commands/distinct.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp
index 59d86a5acf6..9372f78efd0 100644
--- a/src/mongo/db/commands/distinct.cpp
+++ b/src/mongo/db/commands/distinct.cpp
@@ -186,7 +186,9 @@ public:
// collections in multi-document transactions.
auto txnParticipant = TransactionParticipant::get(opCtx);
uassert(ErrorCodes::OperationNotSupportedInTransaction,
- "Cannot run 'distinct' on a sharded collection in a multi-document transaction.",
+ "Cannot run 'distinct' on a sharded collection in a multi-document transaction. "
+ "Please see http://dochub.mongodb.org/core/transaction-distinct for a recommended "
+ "alternative.",
!txnParticipant || !txnParticipant.inMultiDocumentTransaction() ||
!CollectionShardingState::get(opCtx, nss)->getCurrentMetadata()->isSharded());