[SERVER-72136] Cast 'numShardedCollections' to 'size_t' in sharding_server_status.cpp Created: 15/Dec/22  Updated: 29/Oct/23  Resolved: 20/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.19
Fix Version/s: 4.4.19

Type: Bug Priority: Major - P3
Reporter: Pol Pinol Assignee: Pol Pinol
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-12-26
Participants:
Linked BF Score: 35

 Description   

We must cast the numShardedCollections to “size_t” before appending to shardingStatistics in sharding_server_status.cpp.

const auto numShardedCollections = collection ? collection->numRecords(opCtx) : 0;
result.appendNumber("numShardedCollections", numShardedCollections)

to

result.appendNumber("numShardedCollections", (std::size_t)numShardedCollections);



 Comments   
Comment by Githook User [ 20/Dec/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-72136 Cast 'numShardedCollections' to 'size_t' in sharding_server_status.cpp
Branch: v4.4
https://github.com/mongodb/mongo/commit/ab9b47fde668dc635698fd36f3d8b5c5d19b42e9

Generated at Thu Feb 08 06:20:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.