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

mongodump --repair --dbpath omits many records

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.6.13
    • Affects Version/s: 2.6.11
    • Component/s: Storage, Tools
    • Fully Compatible
    • ALL
    • Integration 13 (04/22/16)

      The scan loop in mongodump repair terminates on this condition in _repairExtent in dump.cpp::

                  // break when new loc is outside current extent boundary
                  if ( ( forward && loc.compare( e->lastRecord ) > 0 ) || 
                       ( ! forward && loc.compare( e->firstRecord ) < 0 ) ) 
                  {
                      break;
                  }
      

      This is meant to be a check that the record is within the extent boundaries, however instead it is checking firstRecord and lastRecord, which are pointers to the start and end of the linked list, not the extent boundaries.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: