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

MongoDB should restart when WiredTiger detects corruption

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Storage Engines
    • ALL

      When WiredTiger (WT) encounters corruption, it sets a PANIC on the connection and begins to shutdown. A salvage error is returned, asking MongoDB to call wiredtiger_open with salvage set in the configuration to recover the data.

      As part of the shutdown after detecting corruption, it is not safe to traverse the internal btree and evict data. The tree structure itself could be corrupted or we might end up writing corrupted data to the disk. Without going through eviction at the time of shutdown WiredTiger is unable to safely release memory that was used to build the cache. In such a case if MongoDB opens a new connection to WiredTiger to salvage, it is going to leak the memory previous WiredTiger connection did not free.

      This ticket is going to investigate the cases where a new WT connection is opened after WT shuts down with corruption causing MongoDB to leak memory.

      The related tickets might point out to BFs that have detected this memory leak.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: