diff options
author | Pol Pinol Castuera <pol.pinol@mongodb.com> | 2022-12-20 10:44:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-20 12:12:11 +0000 |
commit | ab9b47fde668dc635698fd36f3d8b5c5d19b42e9 (patch) | |
tree | 5d5cf8fa72c739a686bc3d26e159b00cd6ec8549 | |
parent | a024a72f29101bce28fc612c7dc02fcf6ea95391 (diff) | |
download | mongo-ab9b47fde668dc635698fd36f3d8b5c5d19b42e9.tar.gz |
SERVER-72136 Cast 'numShardedCollections' to 'size_t' in sharding_server_status.cpp
-rw-r--r-- | src/mongo/db/s/sharding_server_status.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/s/sharding_server_status.cpp b/src/mongo/db/s/sharding_server_status.cpp index e17d02dac5c..b5fcfe66a4d 100644 --- a/src/mongo/db/s/sharding_server_status.cpp +++ b/src/mongo/db/s/sharding_server_status.cpp @@ -119,7 +119,8 @@ public: if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) { AutoGetCollectionForRead autoColl(opCtx, CollectionType::ConfigNS); const auto& collection = autoColl.getCollection(); - const auto numShardedCollections = collection ? collection->numRecords(opCtx) : 0; + const std::size_t numShardedCollections = + collection ? collection->numRecords(opCtx) : 0; result.appendNumber("numShardedCollections", numShardedCollections); } |