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

Need to support --repairpath outside of --dbpath with journaling on

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.0.1
    • Component/s: Stability, Storage
    • Environment:
      2.0.1 binaries (64 bit) on Windows 7 x64
    • Storage Execution
    • Fully Compatible
    • ALL

      Start a new database, insert 1 document in it. Now shutdown the database and run mongod --repair --repairpath <>. This immediately crashes with
      c:\mongo\mongodb-win32-x86_64-2.0.1\bin>mongod.exe --repair --repairpath c:\data\repair
      Fri Nov 11 13:28:10 [initandlisten] MongoDB starting : pid=7752 port=27017 dbpath=/data/db 64-bit host=Sridhar-PC
      Fri Nov 11 13:28:10 [initandlisten] db version v2.0.1, pdfile version 4.5
      Fri Nov 11 13:28:10 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88cac31bdd684
      Fri Nov 11 13:28:10 [initandlisten] build info: windows (6, 1, 7601, 2, 'Service Pack 1') BOOST_LIB_VERSION=1_42
      Fri Nov 11 13:28:10 [initandlisten] options:

      { repair: true, repairpath: "c:\data\repair" }

      Fri Nov 11 13:28:10 [initandlisten] journal dir=/data/db/journal
      Fri Nov 11 13:28:10 [initandlisten] recover : no journal files present, no recovery needed
      Fri Nov 11 13:28:11 [initandlisten] ****
      Fri Nov 11 13:28:11 [initandlisten] ****
      Fri Nov 11 13:28:11 [initandlisten] need to upgrade database test with pdfile version 4.5, new version: 4.5
      Fri Nov 11 13:28:11 [initandlisten] starting upgrade
      Fri Nov 11 13:28:11 [initandlisten] test repairDatabase test
      Fri Nov 11 13:28:11 [initandlisten] removeJournalFiles
      Fri Nov 11 13:28:11 [initandlisten] warning file is not under db path? c:/data/repair/$tmp_repairDatabase_3/test /data/d
      b
      Fri Nov 11 13:28:11 [initandlisten] warning file is not under db path? c:/data/repair/$tmp_repairDatabase_3/test.ns /dat
      a/db
      Fri Nov 11 13:28:11 [initandlisten] warning file is not under db path? c:/data/repair/$tmp_repairDatabase_3/test /data/d
      b
      Fri Nov 11 13:28:11 [initandlisten] warning file is not under db path? c:/data/repair/$tmp_repairDatabase_3/test.0 /data
      /db
      Fri Nov 11 13:28:11 [initandlisten] build index test.foo

      { _id: 1 }

      Fri Nov 11 13:28:11 [initandlisten] build index done 1 records 0.005 secs
      Fri Nov 11 13:28:11 [initandlisten] Assertion failure _recovering db\dur_recover.cpp 235
      Fri Nov 11 13:28:11 [initandlisten] dbexception in groupCommit causing immediate shutdown: 0 assertion db\dur_recover.cp
      p:235
      Fri Nov 11 13:28:11 gc1

      Note: If you run mongod --repair --repairpath --nojournal this does not occur

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            sridhar Sridhar Nanjundeswaran
            Votes:
            13 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: