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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Pol Pinol
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: