-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Storage
-
Fully Compatible
-
Repl 2018-02-26, Repl 2018-03-12
Creating/dropping WiredTiger tables are not "transactionable" operations, they take effect immediately. MongoDB maps collections (and indexes) to WiredTiger tables with the following algorithm:
Create:
- Create the WiredTiger table.
- Create the collection document in the `_mdb_catalog` referencing the table.
Drop:
- Remove the collection document from the `_mdb_catalog`.
- Remove the WiredTiger table.
If a crash happens, there are three cases to consider:
- Both the collection document and the table exist. Everything is fine.
- The collection document is missing, but the table exists. It's legal to drop the table.
- The collection document exists, but the table is missing. The algorithm forbids this state.
However, a combination of stable checkpoints and turning off journaling for the `_mdb_catalog` changes this expectation. When a node crashes, the data on disk may still contain the `_mdb_catalog` entry for a dropped collection, but the table will be missing.
This ticket is to coerce the storage engine into believing this is a legal state, specifically in the case of crash recovery. In this mode, the storage engine will drop collections documents from the `_mdb_catalog` when their corresponding table is found not to exist. There's a followup ticket, to be written, where the goal is to make storage engine drops safe in this regard in a more robust way.
- is depended on by
-
SERVER-29213 Have KVWiredTigerEngine implement StorageEngine::recoverToStableTimestamp
- Closed
- related to
-
SERVER-33161 Postpone WiredTigerKVEngine table drops until the _mdb_catalog change is checkpointed
- Closed
-
SERVER-44391 Refine startup cleanup of tmpfiles for resumable index builds
- Closed
-
SERVER-49301 remove startingAfterUncleanShutdown decorator
- Closed