[SERVER-3471] Drop database caused collections in other DB's to dropped Created: 25/Jul/11  Updated: 12/Jul/16  Resolved: 29/Jul/11

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 1.8.1, 1.8.2, 1.8.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Greg Studer
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

http://groups.google.com/group/mongodb-user/browse_thread/thread/34cda5dac73edff7


Issue Links:
Depends
Duplicate
is duplicated by SERVER-2817 (DropDatabase + Sharding + Prefixed D... Closed
is duplicated by SERVER-3205 Dropping sharded database leads to er... Closed
Operating System: ALL
Participants:

 Description   

Problem:

As reported in Google Groups

http://groups.google.com/group/mongodb-user/browse_thread/thread/34cda5dac73edff7

Database names called

  • buy
  • buy_201107
  • buy_201108

User did
> use buy
> db.dropdatabse()

From the logs it can be seen

Sat Jul 23 23:49:38 [conn663642] DROP DATABASE: buy
Sat Jul 23 23:49:38 [conn663642] DBConfig::dropDatabase: buy
Sat Jul 23 23:49:39 [conn663642] about to log metadata event: { _id:
"mg03-2011-07-23T15:49:38-0", server: "mg03", clientAddr: "N/A", time:
new Date(1311436179027), what: "dropDatabase.start", ns: "buy",
details: {} }

Look good, but next message it looks like the NS changed

Sat Jul 23 23:49:39 [conn663642] about to log metadata event: { _id:
"mg03-2011-07-23T15:49:39-1", server: "mg03", clientAddr: "N/A", time:
new Date(1311436179091), what: "dropCollection.start", ns:
"buy_201107.data", details: {} }

This message comes from chunk.cpp:775, however, the code path to here looks reasombale.



 Comments   
Comment by Greg Studer [ 29/Jul/11 ]

think this is a regex issue, should be fixed by the backport above in 1.8 branch.

Comment by auto [ 29/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: escaping for regex - SERVER-3471
Branch: v1.8
https://github.com/mongodb/mongo/commit/48d0219905699adfab7019ac951527875869a63c

Comment by auto [ 28/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: escaping for regex - SERVER-3471
Branch: master
https://github.com/mongodb/mongo/commit/af93c5d8771461d85052bcda918179c8259a387c

Comment by auto [ 28/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: clean test case SERVER-3471
Branch: master
https://github.com/mongodb/mongo/commit/05ed9407e35a03fb3fecd577471205cc6c659b50

Comment by David Whittington [ 25/Jul/11 ]

I just encountered this as well on v1.8.1.

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