[SERVER-57766] Omit shardingStatistics.resharding section when resharding hasn't been run on the cluster Created: 16/Jun/21  Updated: 29/Oct/23  Resolved: 16/Dec/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.3.0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Matt Boros
Resolution: Fixed Votes: 0
Labels: PM-234, neweng, sharding-nyc-subteam1, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.2
Sprint: Sharding 2021-12-13, Sharding 2021-12-27
Participants:
Story Points: 2

 Description   

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.



 Comments   
Comment by Githook User [ 17/Dec/21 ]

Author:

{'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com'}

Message: SERVER-57766 Omit shardingStatistics.resharding section when resharding hasn't been run

(cherry picked from commit af124a52fdc593418c4146b76c0c55f732739d16)
Branch: v5.2
https://github.com/mongodb/mongo/commit/902f9280571e743f2abb8e6a313f5ae6b14ba632

Comment by Githook User [ 16/Dec/21 ]

Author:

{'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com'}

Message: SERVER-57766 Omit shardingStatistics.resharding section when resharding hasn't been run
Branch: master
https://github.com/mongodb/mongo/commit/af124a52fdc593418c4146b76c0c55f732739d16

Comment by Max Hirschhorn [ 22/Nov/21 ]

Some code links:

Generated at Thu Feb 08 05:42:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.