[SERVER-13083] "insert" command into system.indexes not prohibited Created: 06/Mar/14  Updated: 06/Dec/22  Resolved: 07/Dec/16

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-12657 validate all write command writes to ... Closed
is related to DRIVERS-132 Use createIndexes command when available Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Steps To Reproduce:

> db.collection.dropIndexes()
{
	"nIndexesWas" : 3,
	"msg" : "non-_id indexes dropped for collection",
	"ok" : 1
}
> db.runCommand({insert: 'system.indexes', documents: [ { key: {b: 1}, name: 'b_1', ns: 'test.collection' } ] })
{ "ok" : 1, "n" : 1 }
> db.collection.getIndexes()
[
	{
		"v" : 1,
		"key" : {
			"_id" : 1
		},
		"name" : "_id_",
		"ns" : "test.collection"
	},
	{
		"v" : 1,
		"key" : {
			"b" : 1
		},
		"name" : "b_1",
		"ns" : "test.collection"
	}
]
> db.serverBuildInfo()
{
	"version" : "2.6.0-rc2-pre-",
	"gitVersion" : "d8eb19991b01f9fc5e73f0a3acd3f8a59e2d7c7d",
	"OpenSSLVersion" : "",
	"sysInfo" : "Darwin As-MacBook-Pro-2.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
	"loaderFlags" : "-fPIC -pthread -Wl,-bind_at_load -fstack-protector -mmacosx-version-min=10.6",
	"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe -O0 -fstack-protector -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -mmacosx-version-min=10.6",
	"allocator" : "tcmalloc",
	"versionArray" : [
		2,
		6,
		0,
		-8
	],
	"javascriptEngine" : "V8",
	"bits" : 64,
	"debug" : true,
	"maxBsonObjectSize" : 16777216,
	"ok" : 1
}

Participants:

 Description   

The drivers team thought that inserting into system.indexes with the "insert" command (as opposed to legacy OP_INSERT) would be prohibited, forcing us to migrate to the createIndexes command. But insertion into system.indexes with the "insert" command is still allowed.



 Comments   
Comment by Eric Milkie [ 07/Dec/16 ]

This is WAD for now. It's not clear if we will need to remove this functionality in the future.

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