[SERVER-40712] Clarify the behaviour of `db.dropDatabase` and the `dropDatabase` command Created: 18/Apr/19 Updated: 29/Oct/23 Resolved: 14/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.12, 4.0.27 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | 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.0
|
||||||||||||||||||||
| Sprint: | Storage NYC 2019-05-20 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||
| Description |
|
The drop database command and shell helper are both documented as accepting write concern, but reading through the code and testing them seems to disagree with the documentation. Specifically:
I am filing this ticket to request clarification on the behaviour of the dropDatabase command and shell helper and to have the documentation updated. |
| Comments |
| Comment by Githook User [ 10/Aug/21 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit cfd65015b39fe7b0db6aec288f69163bc5763812) |
| Comment by Githook User [ 14/May/19 ] |
|
Author: {'name': 'Gregory Wlodarek', 'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com'}Message: |
| Comment by Eric Milkie [ 18/Apr/19 ] |
|
Also it's not really a "default", it's more like the "minimum". If a user specifies a write concern, it is waited for in conjunction with w:majority. |
| Comment by Eric Milkie [ 18/Apr/19 ] |
|
That is correct. It's like the other commands that have this default, such as the user authorization modification commands. |
| Comment by Kaloian Manassiev [ 18/Apr/19 ] |
|
To what does the write concern default for this command if not specified? Looks like it defaults to majority, at least from Danny's repro. |
| Comment by Eric Milkie [ 18/Apr/19 ] |
|
I linked in the ticket where we enabled write-concern for this command. It sounds like we may have to fix up the shell helper and documentation. |