This was first discovered by jonathan.abrahams in the linked ticket.
When we do an insert, a DatabaseCatalogEntry is created implicitly before validating the namespace string (batch_executor.cpp). The insert would fail after the DatbaseCatalogEntry is created.
For KVEngines, creating a DatabaseCatalogEntry is basically a noop (kv_storage_engine.cpp), so no harm is done.
For mmapv1, a data file with an invalid name would be created in (mmap_v1_database_catalog_entry.cpp). Subsequent calls to show dbs would require getting the list of data files and this invalid one will show up.
- related to
-
SERVER-21696 applyOps with invalid ns field triggers fassert on MMAP
- Closed
-
SERVER-10926 NamespaceString inconsistent on allowing '$' in database name
- Closed