-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Execution Team 2023-03-20
-
135
_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}}
- causes
-
SERVER-75395 Handle write conflict retries for dropDatabase
- Closed
- is related to
-
SERVER-77278 Replication rollback of a dropDatabase oplog entries leaves the in-memory database closed on the primary but open on secondaries, leading to secondaries crashing on receipt of conflicting database name
- Closed
-
SERVER-77281 Investigate removing use of the DatabaseHolder and/or dropDatabase oplog entry in the storage execution layer
- Closed
- related to
-
SERVER-90089 dropDatabase may complete without emitting an op entry when the node performing the operation gets restarted mid-request
- Closed