[SERVER-36317] Mongos returns true when attempting to drop non-existent database Created: 26/Jul/18  Updated: 27/Oct/23  Resolved: 27/Aug/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Daniel Aprahamian (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-32365 Move the logic of the dropDatabase co... Closed
Participants:

 Description   

With the following command:

{
  drop: 'a_collection_that_does_not_exist',
  writeConcern: { w: 'majority', wtimeout: 30000 }
}

Sending the following command to a mongod (replicaset or standalone) results in an error ns not found. Sending the command to a mongos returns ok: 1.

Is this inconsistency expected?



 Comments   
Comment by Githook User [ 14/Jan/19 ]

Author:

{'username': 'daprahamian', 'email': 'dan.aprahamian@gmail.com', 'name': 'Dan Aprahamian'}

Message: test(drop): fixing drop assertions for sharded tests

As tracked in SERVER-36317, dropping a non-existent collection
behaves differently for sharded topologies. Disabling assertions
that depend on this until the issue is resolved.
Branch: master
https://github.com/mongodb/node-mongodb-native/commit/985f0e98989113c1cddba2c876a0de7ea8a5f8ae

Comment by Githook User [ 24/Sep/18 ]

Author:

{'name': 'Dan Aprahamian', 'email': 'dan.aprahamian@gmail.com', 'username': 'daprahamian'}

Message: test(drop): fixing drop assertions for sharded tests

As tracked in SERVER-36317, dropping a non-existent collection
behaves differently for sharded topologies. Disabling assertions
that depend on this until the issue is resolved.
Branch: fix-sharded-tests
https://github.com/mongodb/node-mongodb-native/commit/e27f67fc673f3501b57e7bc2547ba6b64c5dac5e

Comment by Gregory McKeon (Inactive) [ 27/Aug/18 ]

daniel.aprahamian it seems we failed to mark the ticket that introduced this change, SERVER-32365, as drivers changes needed. Since this is the expected behavior, I'm closing this out - feel free to reopen if you have additional questions.

Comment by Esha Maharishi (Inactive) [ 27/Aug/18 ]

Yes, it's expected, though it is a change as of 4.0.

As part of "move metadata commands to the config server", we had to make metadata commands retryable in a cluster, so that mongos can retry the command on receiving a NotMaster-esque error from the config server the mongos was talking to.

Comment by Githook User [ 01/Aug/18 ]

Author:

{'name': 'Dan Aprahamian', 'email': 'dan.aprahamian@gmail.com', 'username': 'daprahamian'}

Message: test(drop): fixing drop assertions for sharded tests

As tracked in SERVER-36317, dropping a non-existent collection
behaves differently for sharded topologies. Disabling assertions
that depend on this until the issue is resolved.
Branch: fix-sharded-tests
https://github.com/mongodb/node-mongodb-native/commit/200276d95e04b2f8b0c310f6c4f2f0ea13adf203

Generated at Thu Feb 08 04:42:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.