[SERVER-43402] Secondary oplog can have entry to create a same name but different capitalized database before dropping the old one Created: 20/Sep/19 Updated: 29/Oct/23 Resolved: 01/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Catalog |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1, 4.2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gregory Wlodarek | Assignee: | Gregory Wlodarek |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | |||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.2
|
|||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | resmoke --suites=replica_sets test.js
|
|||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2019-10-07 | |||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 10 | |||||||||||||||||||||||||||||||||||||
| Description |
|
This started occurring in our testing when the exclusive global locks were removed in dropDatabase() here. The secondaries oplog can have oplog entries to create the same name but differently capitalized database name prior to running the oplog entry to drop the older database. In this code, there's a small window between the dropDb() call and creating the oplog entry for secondaries where a create database command on the same name but different capitalization can occur causing the createDb oplog entry to get sent to secondaries before the dropDb oplog entry. The secondary will try to create the database, but will fassert because another database with the same name but different capitalization still exists. |
| Comments |
| Comment by Githook User [ 16/Oct/19 ] |
|
Author: {'name': 'Gregory Wlodarek', 'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com'}Message: (cherry picked from commit 15c6c085126f5d459f30191ef736c10607bea3f6) |
| Comment by Githook User [ 01/Oct/19 ] |
|
Author: {'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}Message: |
| Comment by Gregory Wlodarek [ 27/Sep/19 ] |
|
After discussing with daniel.gottlieb and geert.bosch, we've decided that we're going to call dropDb() in an onCommit() hook once the onDropDatabase() runs and gets committed. |
| Comment by Gregory Wlodarek [ 27/Sep/19 ] |
|
Verified with daniel.gottlieb that the ticket xiangyu.yao has ( |
| Comment by Dianna Hohensee (Inactive) [ 27/Sep/19 ] |
|
Xiangyu has a ticket that might fix this problem: should be explored, or wait. |