diff options
-rw-r--r-- | src/mongo/db/s/collection_sharding_runtime.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mongo/db/s/collection_sharding_runtime.cpp b/src/mongo/db/s/collection_sharding_runtime.cpp index 15e73931ec1..4ffd8278106 100644 --- a/src/mongo/db/s/collection_sharding_runtime.cpp +++ b/src/mongo/db/s/collection_sharding_runtime.cpp @@ -104,13 +104,9 @@ CollectionShardingRuntime* CollectionShardingRuntime::get_UNSAFE(ServiceContext* ScopedCollectionFilter CollectionShardingRuntime::getOwnershipFilter( OperationContext* opCtx, OrphanCleanupPolicy orphanCleanupPolicy) { const auto optReceivedShardVersion = getOperationReceivedVersion(opCtx, _nss); - // TODO (SERVER-52764): No operations should be calling getOwnershipFilter without a shard - // version - // - // invariant(optReceivedShardVersion, - // "getOwnershipFilter called by operation that doesn't specify shard version"); - if (!optReceivedShardVersion) - return {kUnshardedCollection}; + // No operations should be calling getOwnershipFilter without a shard version + invariant(optReceivedShardVersion, + "getOwnershipFilter called by operation that doesn't specify shard version"); auto metadata = _getMetadataWithVersionCheckAt( opCtx, repl::ReadConcernArgs::get(opCtx).getArgsAtClusterTime()); |