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

Include _id on failure to find document during rollback

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.13, 2.6.8, 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: