[SERVER-6689] Dropping a database while the balancer is switched off will cause the database to reappear after the balancer returns Created: 02/Aug/12  Updated: 15/Aug/12  Resolved: 10/Aug/12

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.0.4, 2.0.6, 2.2.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andre de Frere Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

Dropping the database, with the balancer off, doesn't seem to actually drop the database. After the balancer is switched back on the database reappears in the return of 'show dbs'.

To reproduce:

  • Create a new database, enable sharding and shard a collection in the database.
  • Switch off the balancer: db.settings.update({_id: "balancer"}, {$set: {stopped: true, true)}}
  • Drop the database
  • Show dbs, database should not appear
  • Switch on the balancer: db.settings.update({_id: "balancer"}, {$set: {stopped: true, true)}}
  • Show dbs, database should appear again.

Database should return with no collections.



 Comments   
Comment by Andre de Frere [ 10/Aug/12 ]

Issue has been found to be invalid.

Database is only recreated using the instructions from linked ticket. This is because the switch to the config database was not being made, so in fact a new collection called settings was created before and after the database was dropped instead of the balancer being switched off. As the settings collection was created after the database was dropped, this will have recreated the database.

Comment by Andre de Frere [ 02/Aug/12 ]

Repro's in 2.2 as well

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