-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
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.