[DOCS-4723] Check for failure in cleanupOrphaned script Created: 23/Jan/15  Updated: 13/Nov/23  Resolved: 04/Feb/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.18, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

http://docs.mongodb.org/manual/reference/command/cleanupOrphaned/#remove-all-orphaned-documents-from-a-shard


Issue Links:
Related
is related to DOCS-12938 [Server] cleanupOrphaned example coul... Closed
Participants:
Days since reply: 9 years, 2 weeks ago

 Description   

The example code shows how to run cleanupOrphaned in a loop, so as to clean all orphans in a collection. This is more than just sample code, this is what is actually used in the field to clean up orphans on real systems.

Earlier on this page the conditions that can cause cleanupOrphaned to fail are explained.

However, this code does not check if the cleanupOrphaned command has failed (ie. it doesn't check the "ok" field of the command's result). This means that the script will plough on regardless, and doesn't inform the user of this problem. Suggest that it print out the whole result document, as well as an error if it detects result.ok != 1



 Comments   
Comment by Githook User [ 04/Feb/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4723 add more print statements in cleanupOrphaned example
Branch: master
https://github.com/mongodb/docs/commit/04381bae802febf0039848eff188c36de636ece7

Comment by Githook User [ 04/Feb/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4723 add more print statements in cleanupOrphaned example
Branch: v2.6
https://github.com/mongodb/docs/commit/88238a8137e06c33c7ffe7b81fed689e7438605e

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