[DOCS-12700] Docs for SERVER-40712: Clarify the behaviour of `db.dropDatabase` and the `dropDatabase` command Created: 14/May/19  Updated: 13/Nov/23  Resolved: 23/May/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.1.12, 4.0.27, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backports DOCS-14723 [BACKPORT] [v4.0] Clarify the behavio... Closed
Documented
documents SERVER-40712 Clarify the behaviour of `db.dropData... Closed
Participants:
Days since reply: 4 years, 37 weeks, 6 days ago
Epic Link: DOCS: 4.2 Server/Tools

 Description   

Description

Description:

For the 'mongo' shell documentation we need to make one change here: https://docs.mongodb.com/manual/reference/method/db.dropDatabase/#db.dropDatabase

Right now the definition is 'db.dropDatabase(<option>)'. We should change this to clarify what <option> is, it can only be a write concern object. We should probably also link in documentation to what write concern is if users are visiting this page.

Engineering Ticket 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:

  • From the shell code it looks like db.dropDatabase does not allow any parameters. So how does one specify majority write concern through the shell helper?
  • Executing the dropDatabase command directly, without passing write concern seems to always result in a w:majority behaviour. In particular, daniel.hatcher performed these repro steps: "3 member replica set, fyncLocked 2 of the members, command hung on primary".

I am filing this ticket to request clarification on the behaviour of the dropDatabase command and shell helper and to have the documentation updated.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 23/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-12700: 4.0 clarify db.dropDatabase and dropDatabase wc
Branch: v4.0
https://github.com/mongodb/docs/commit/5eae5ae241c3eff091ca0808ffa4732616d25955

Comment by Githook User [ 23/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-12700: 4.2 db.dropDatabase takes writeConcern param
Branch: master
https://github.com/mongodb/docs/commit/52ee8901cf6a6a393ef9e4bc8f7b8fc1425b3562

Generated at Thu Feb 08 08:05:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.