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

MongoDB should crash if a data file is deleted

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.6.9
    • Component/s: MMAPv1
    • Labels:
      None
    • ALL

      During the MongoDB 2.7.x development cycle an invariant check was added to ExtentManager::_getOpenFile to abort the mongod process if a _getOpenFile() call fails.

      This invariant check mitigates some avoidable query integrity and failover issues if required MMAP data files are unable to be opened, and should be backported to the 2.6 branch.

      The expectation is that a mongod attempting to open missing data files should abort and trigger any normal HA/failover logic; this is particularly important if that node is a config server or replica set primary.

      Original Description:

      When a file is deleted / or lost, the single process is corrupted but this doesn't cause a process termination. The process continues running providing incomplete information to the queries.

      I believe the specific file checks should trigger a fatal assertion instead of letting the process run in a corrupted state.

      • 2.6
      • 3.2 (invariant(false) is triggering the process abortion? if so, this method was not invoked when some tests were performed causing a similar issue)

      This is causing issues avoiding the high availability mechanisms to be triggered for config servers and replica sets.

            Assignee:
            asya.kamsky@mongodb.com Asya Kamsky
            Reporter:
            ricardo.lorenzo Ricardo Lorenzo
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: