[SERVER-19037] create command fails on mongos immediately following a dropDatabase command on another Created: 18/Jun/15  Updated: 14/Apr/16  Resolved: 31/Jul/15

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

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Kaloian Manassiev
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

After dropping a database on one mongos, collection creation fails on a different mongos with the error:

{ "ok" : 0.0, "errmsg" : "collection already exists", "code" : 48 }

This does not occur on 3.0.



 Comments   
Comment by Kaloian Manassiev [ 31/Jul/15 ]

The scenario described works. I verified it with the following script, with both sharded and unsharded collections:

var st = new ShardingTest({ shards: 1, mongos: 2 });
st.s0.getDB('admin').runCommand({ enableSharding: 'TestDB' });
st.s0.getDB('admin').runCommand({ shardCollection: 'TestDB.TestColl', key: { shardKey: 1 } });
 
st.s0.getDB('TestDB').TestColl.insert({ shardKey: 1 });
st.s1.getDB('TestDB').TestColl.insert({ shardKey: 2 });
 
st.s0.getDB('TestDB').dropDatabase();
st.s1.getDB('TestDB').runCommand({ create: 'TestColl' });

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