diff options
author | Pol Pinol Castuera <pol.pinol@mongodb.com> | 2023-03-20 08:40:02 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-12 12:34:14 +0000 |
commit | 46832492a977b636552649f00cfdb9e2c242cebf (patch) | |
tree | 02dd307cbf8780cf44cd75ca8cf80e5b185871c9 | |
parent | 4bd5f34f0274d8d8732cb827b7126c5bbb0424f0 (diff) | |
download | mongo-46832492a977b636552649f00cfdb9e2c242cebf.tar.gz |
SERVER-74720 The default 'shardingStatistics' serverStatus section takes locks
(cherry picked from commit f18e1f8b2d5f5988fa7c6e18e343c9c85589bae9)
-rw-r--r-- | src/mongo/db/s/sharding_server_status.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/s/sharding_server_status.cpp b/src/mongo/db/s/sharding_server_status.cpp index 618e828bec2..16716a5fb68 100644 --- a/src/mongo/db/s/sharding_server_status.cpp +++ b/src/mongo/db/s/sharding_server_status.cpp @@ -146,7 +146,7 @@ public: // `config.collections` collection. This count must only be appended when serverStatus is // invoked on the config server. if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) { - AutoGetCollectionForRead autoColl(opCtx, CollectionType::ConfigNS); + AutoGetCollectionForReadLockFree autoColl(opCtx, CollectionType::ConfigNS); const auto& collection = autoColl.getCollection(); const auto numShardedCollections = collection ? collection->numRecords(opCtx) : 0; result.append("numShardedCollections", numShardedCollections); |