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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.4.19
    • 4.4.19
    • None
    • Sharding EMEA
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-12-26
    • 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);
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: