[SERVER-74683]  views and collections can be created but not dropped in config db on sharded cluster Created: 07/Mar/23  Updated: 31/Aug/23  Resolved: 31/Aug/23

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

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to SERVER-78805 Allow Customers to Drop Non-System Cr... Backlog
split to SERVER-78806 Creation of Non-System Collections an... Backlog
Assigned Teams:
Sharding EMEA
Operating System: ALL
Sprint: Sharding EMEA 2023-07-10
Participants:

 Description   

mongos> use config
switched to db config
mongos> db.createView("view", "shards", [])
{
	"ok" : 1,
	"$clusterTime" : {
		"clusterTime" : Timestamp(1678225680, 2),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1678225680, 2)
}
mongos> db.view.drop()
uncaught exception: Error: drop failed: {
	"ok" : 0,
	"errmsg" : "Cannot drop collection in 'config' database in sharded cluster",
	"code" : 20,
	"codeName" : "IllegalOperation",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1678225682, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1678225682, 1)
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBCollection.prototype.drop@src/mongo/shell/collection.js:713:15
@(shell):1:1



 Comments   
Comment by Matt Panton [ 12/Jul/23 ]

cris.insignarescuello@mongodb.com - I think this ticket can go back to backlog as I've created the relevant tickets to fix this bug - SERVER-78805  & SERVER-78806

Comment by James Wahlin [ 07/Mar/23 ]

Looks like this is true for collections as well. They can be created in the config db but not dropped via drop command

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