|
_finishDropDatabase() replicates the dropDatabase oplog entry before clearing the collection catalog. This is not done atomically.
The problem is if we step down after writing out the dropDatabase oplog entry, the node becomes a secondary with the collection catalog still containing the database name. If the new primary creates the same database name with a different casing, the secondary will fatally assert with the following:
[js_test:database_differ_case] d20040| {"t":{"$date":"2023-03-08T17:57:17.451+00:00"},"s":"F", "c":"ASSERT", "id":23095, "ctx":"OplogApplier-0","msg":"Fatal assertion","attr":{"msgid":34437,"error":"DatabaseDifferCase: db already exists with different case already have: [test] trying to create [TEST]","file":"src/mongo/db/repl/oplog_applier_impl.cpp","line":394}}
|
|