[SERVER-17983] Indicate if cleanupOrphaned deleted any documents Created: 10/Apr/15  Updated: 06/Dec/22  Resolved: 14/Jun/18

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

Type: New Feature Priority: Major - P3
Reporter: Adam Flynn Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 2
Labels: orphaned
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-15408 cleanupOrphaned should output progress Closed
related to SERVER-17013 Add 'dry run' mode for cleanupOrphaned Closed
Assigned Teams:
Sharding
Sprint: Sharding 10 (02/19/16)
Participants:

 Description   

It would be helpful to be able to keep tabs on when/where orphans are occurring in a cluster. Most of the time, cleanupOrphaned runs without cleaning anything, but we've had instances where the number of orphans went up significantly. In these cases, we didn't realize we had an orphan problem until we started getting reports from users.

Ideally, we'd be able to get this information from MongoDB so we can investigate proactively. Right now, we use how long cleanupOrphaned takes as a proxy for figuring out if it did any work (e.g. if it returns in under 15s, it probably didn't find any). This produces too many false positives to be useful, though. We've looked at options for parsing this out of logs, but it's not easy to grep for.

I think a reasonable API would be to add a field, ndeleted to the output of cleanupOrphaned. That would make it easy to setup thresholds by collection for what's worth investigating. Alternatively, a bool field that just indicates if any documents were deleted would probably be sufficient for my use case.



 Comments   
Comment by Kaloian Manassiev [ 14/Jun/18 ]

We are going in the direction of making the range deleter less and less visible and working in the background. With this model it is difficult to determine which orphans were cleaned up as a result of the command or from background activity.

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