summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/collection_sharding_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/collection_sharding_state.cpp')
-rw-r--r--src/mongo/db/s/collection_sharding_state.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp
index d457d260f09..2d6dfed45e0 100644
--- a/src/mongo/db/s/collection_sharding_state.cpp
+++ b/src/mongo/db/s/collection_sharding_state.cpp
@@ -258,18 +258,6 @@ void CollectionShardingState::checkShardVersionOrThrow(OperationContext* opCtx)
}
}
-bool CollectionShardingState::collectionIsSharded(OperationContext* opCtx) {
- auto metadata = getMetadata(opCtx).getMetadata();
- if (metadata && (metadata->getCollVersion().isStrictlyEqualTo(ChunkVersion::UNSHARDED()))) {
- return false;
- }
-
- // If 'metadata' is null, then the shard doesn't know if this collection is sharded or not. In
- // this scenario we will assume this collection is sharded. We will know sharding state
- // definitively once SERVER-24960 has been fixed.
- return true;
-}
-
// Call with collection unlocked. Note that the CollectionShardingState object involved might not
// exist anymore at the time of the call, or indeed anytime outside the AutoGetCollection block, so
// anything that might alias something in it must be copied first.