Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17498

Include _id on failure to find document during rollback

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.0
    • Affects Version/s: 2.4.13, 2.6.8, 3.0.0
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible

      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";
                      }
      

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: