We may fail to start up in standalone mode after an unclean shutdown with unfinished index builds. This scenario specifically:
- Replica set node crashes during an index build
- During startup recovery as a replica set node, we drop the index table to rebuild the index, but the node crashes again. This may leave a state with an index in the catalog but a missing index table.
- When starting the node in standalone mode, the following error occurs:
Currently, the only known remediation is "oplog surgery".
We need to ensure that unfinished indexes in standalone mode do not attempt to open the underlying table, and additionally ensure they can be dropped by the user in standalone mode.