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

Omit shardingStatistics.resharding section when resharding hasn't been run on the cluster

    • Fully Compatible
    • v5.2
    • Sharding 2021-12-13, Sharding 2021-12-27
    • 2

      bruce.lucas has said that because resharding isn't a very frequently run operation that the cost of incurring the schema change in FTDC is worth the savings benefit of not reporting anything when the counters are all zero.

       

      All of the sharding-related information that will get appended to response for the serverStatus commands lives in sharding_server_status.cpp. Currently it will utilize ReshardingMetrics (resharding_metrics.cpp) in order to append the resharding-related information to every serverStatus response. It will get that information by calling the serializeCumulativeOpMetrics function in ReshardingMetrics.

       

      Since we only want to add the resharding information if the resharding operation has ever been executed, we'll want to check the cumulative metrics. In order to achieve that we should check:

      • kTotalOps
      • kFailedOps
      • kAbortedOps
      • kSuccessfulOps

      If any of them are non-zero, then we should add the resharding-related information to the serverStatus response.

            Assignee:
            matt.boros@mongodb.com Matt Boros
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: