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

Consider making num_hosts_targeted_metrics use unsigned ints

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Workload Scheduling
    • Fully Compatible
    • Workload Scheduling 2024-09-30

      In HELP-54999, a customer saw the value of shardingStatistics.numHostsTargeted become negative after their system had been up and running for a while. We suspect that this is because the value of shardingStatistics.numHostsTargeted exceeded the maximum value of int, and wrapped back around to become negative. 

      We should consider making these metrics that cannot reasonably be negative numbers into unsigned ints, and audit the codebase for other metrics that use signed types which would be more aptly represented as unsigned types.

            Assignee:
            guillaume.racicot@mongodb.com Guillaume Racicot
            Reporter:
            erin.mcnulty@mongodb.com Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: