Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72136

Cast 'numShardedCollections' to 'size_t' in sharding_server_status.cpp

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.19
    • Affects Version/s: 4.4.19
    • Component/s: None
    • Sharding EMEA
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-12-26
    • 35

      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);
      

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: