[SERVER-17498] Include _id on failure to find document during rollback Created: 06/Mar/15  Updated: 18/Sep/15  Resolved: 10/Mar/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.4.13, 2.6.8, 3.0.0
Fix Version/s: 3.1.0

Type: Improvement Priority: Major - P3
Reporter: James Wahlin Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Participants:

 Description   

RE: https://github.com/mongodb/mongo/blob/r3.0.0/src/mongo/db/repl/rs_rollback.cpp#L587

During the rollback process we print an error if a document that is eligible for deletion / addition to rollback file does not exist in the given collection. At present there is no indication as to which document encountered this scenario. Please print the _id value and namespace in question with this error, to allow for traceability when issues are encountered.

                // Add the doc to our rollback file
                BSONObj obj;
                bool found = Helpers::findOne(txn, ctx.db()->getCollection(doc.ns), pattern, obj, false);
                if (found) {
                    removeSaver->goingToDelete(obj);
                }
                else {
                    error() << "rollback cannot find object by id";
                }



 Comments   
Comment by Githook User [ 10/Mar/15 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-17498 mention _id and namespace on failure to find document during rollback
Branch: master
https://github.com/mongodb/mongo/commit/6712a2953eb85517753219f153a7efcf21dce13c

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