summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/shard_key_index_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/shard_key_index_util.cpp')
-rw-r--r--src/mongo/db/s/shard_key_index_util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/s/shard_key_index_util.cpp b/src/mongo/db/s/shard_key_index_util.cpp
index 1cdd4f99008..7050abedb5e 100644
--- a/src/mongo/db/s/shard_key_index_util.cpp
+++ b/src/mongo/db/s/shard_key_index_util.cpp
@@ -186,7 +186,7 @@ bool isLastShardKeyIndex(OperationContext* opCtx,
const BSONObj& shardKey) {
return !_findShardKeyPrefixedIndex(
opCtx, collection, indexCatalog, indexName, shardKey, false /* requireSingleKey */)
- .is_initialized();
+ .has_value();
}
boost::optional<ShardKeyIndex> findShardKeyPrefixedIndex(OperationContext* opCtx,