[SERVER-20865] Record sharding related counters in serverStatus Created: 10/Oct/15  Updated: 13/Aug/18  Resolved: 08/Aug/18

Status: Closed
Project: Core Server
Component/s: Diagnostics, Sharding
Affects Version/s: None
Fix Version/s: 4.1.2

Type: Improvement Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Sarah Zhou
Resolution: Done Votes: 0
Labels: SWDI
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-11966 Docs for SERVER-20865: Record shardin... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-07-30, Sharding 2018-08-13
Participants:
Case:

 Description   

To diagnose sharding-related issues it would be helpful to have some sharding counters in serverStatus, including for example: cumulative count of chunks and documents moved (both on to and from shard if possible), documents deleted (on from shard).



 Comments   
Comment by Githook User [ 08/Aug/18 ]

Author:

{'name': 'Sarah Zhou', 'email': 'sarah.zhou@10gen.com'}

Message: SERVER-20865 Record sharding related counters in serverStatus
Branch: master
https://github.com/mongodb/mongo/commit/7a21994a8155f3b237f7c239798b55c7e9f67a7b

Comment by Bruce Lucas (Inactive) [ 19/Jul/18 ]

The most useful metric is a cumulative count, particularly if it is fine-grained i.e. is incremented as the delete operation goes along.

rangeDelete stats aren't included in ftdc currently, so it would be better if this cumulative counter were in shardingStatistics.

Comment by Sarah Zhou [ 19/Jul/18 ]

bruce.lucas The rangeDeleter stats provides the total count of documents deleted in the last 10 operations. Do you additionally want a cumulative number of documents deleted/moved and the number of documents deleted/moved in the last operation?

Comment by Bruce Lucas (Inactive) [ 13/Jul/18 ]

In addition to shardingStatistics this ticket requests

  • counts of documents moved and documents deleted (the finer the granularity with which these are incremented the better, e.g. on each move or delete if that is practical)
  • counts on recipient as well as donor
Comment by Kaloian Manassiev [ 13/Jul/18 ]

bruce.lucas, would the shardingStatistics which were introduced recently be a close enough substitute for what was requested here?

If not, can you please elaborate on exactly which counters you would like to see and how they should behave?

Comment by Daniel Pasette (Inactive) [ 10/Oct/15 ]

This may be a little cumbersome, but you can get the number of documents deleted from a shard in serverStatus using the rangeDeleter stats and you can get the number of chunks moved from the config server's changelog collection.

Generated at Thu Feb 08 03:55:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.