[SERVER-58720] DropDatabaseCoordinator must not re-execute destructive logic after removing CSRS metadata Created: 21/Jul/21 Updated: 29/Oct/23 Resolved: 28/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 5.0.2 |
| Fix Version/s: | 5.0.3, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pierlauro Sciarelli | Assignee: | Simon Gratzer (Inactive) |
| 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: |
v5.0
|
||||||||||||
| Sprint: | Sharding EMEA 2021-07-26, Sharding EMEA 2021-08-09 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 171 | ||||||||||||
| Description |
|
The removal of a database entry from the config server marks the logical end a drop database operation but not the end of the coordinator lifetime. If a stepdown happens before releasing the coordinator, on the next step-up it will be resumed and re-execute all the dropDatabase logic even though - in the meantime - the database may have been recreated on a different primary shard. As a result, a dropDatabase followed by a createCollection (re-creating the db) may result in data loss. It can't be stated that the collection was recreated while dropDatabase was still running, because the following interleaving can happen:
|
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 09/Aug/21 ] |
|
Author: {'name': 'Simon Graetzer', 'email': 'simon.gratzer@mongodb.com'}Message: |
| Comment by Githook User [ 26/Jul/21 ] |
|
Author: {'name': 'Simon Graetzer', 'email': 'simon.gratzer@mongodb.com'}Message: |
| Comment by Githook User [ 24/Jul/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: Revert " This reverts commit 306a69a50245fb0787391c26597b02c04a156488. |
| Comment by Githook User [ 23/Jul/21 ] |
|
Author: {'name': 'Simon Graetzer', 'email': 'simon.gratzer@mongodb.com'}Message: |