diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2019-05-29 12:31:01 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2019-05-29 15:42:23 -0400 |
commit | d0194cc5133c4e71868156320fee86f0166e0f7e (patch) | |
tree | db4f1495609ea28fd61cb3f7326eed94f6151b6a /src/mongo/db/commands/distinct.cpp | |
parent | d0501d6c8497aa110f39fba726678cab4e47bafc (diff) | |
download | mongo-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.cpp | 4 |
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()); |