diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2019-03-04 17:23:04 +0000 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2019-03-11 20:02:07 -0400 |
commit | 4054c2b07cb658a44fc51d145a1688483e18d666 (patch) | |
tree | 40340abd5c396a27954ca43eafc979ecdb951c44 /src/mongo/s | |
parent | 371197e4bab715a83272a4472e118ee5c5cbbf7c (diff) | |
download | mongo-4054c2b07cb658a44fc51d145a1688483e18d666.tar.gz |
SERVER-39302 Change streams should always use the simple collation when no explicit collation is provided
Diffstat (limited to 'src/mongo/s')
-rw-r--r-- | src/mongo/s/query/cluster_aggregate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index 92142c1c166..e683ae162de 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -465,12 +465,12 @@ std::pair<BSONObj, boost::optional<UUID>> getCollationAndUUID( const bool collectionIsSharded = (routingInfo && routingInfo->cm()); const bool collectionIsNotSharded = (routingInfo && !routingInfo->cm()); - // If the LiteParsedPipeline reports that we should not attempt to resolve the namespace's UUID - // and collation, we immediately return the user-defined collation if one exists, or an empty - // BSONObj otherwise. For instance, because collectionless aggregations generally run against + // If this is a change stream or a collectionless aggregation, we immediately return the user- + // defined collation if one exists, or an empty BSONObj otherwise. Change streams never inherit + // the collection's default collation, and since collectionless aggregations generally run on // the 'admin' database, the standard logic would attempt to resolve its non-existent UUID and // collation by sending a specious 'listCollections' command to the config servers. - if (!litePipe.shouldResolveUUIDAndCollation()) { + if (litePipe.hasChangeStream() || nss.isCollectionlessAggregateNS()) { return {request.getCollation(), boost::none}; } |