[SERVER-13464] Shard with replica set name of "config" not properly detected Created: 02/Apr/14  Updated: 28/Jan/19  Resolved: 28/Jan/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.6.0-rc2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Shaun Verch Assignee: Janna Golden
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Start a sharded cluster where one of the shards is a replica set with the name of "config". Try to insert data into a sharded collection and see that the shard does not get used.

Sprint: Sharding 2019-02-11
Participants:

 Description   

Inserted data with the following script into the cluster:

sh.enableSharding("test")
db.test.ensureIndex({x:1})
sh.shardCollection("test.test", {x:1})
 
var i = 0;
var a = Array(10000).toString()
for (i = 0; i < 1000; i++) { db.test.insert({x:i, a:a}); }

Sharding status output:

mongos> sh.status()
--- Sharding Status ---
  sharding version: {
	"_id" : 1,
	"version" : 4,
	"minCompatibleVersion" : 4,
	"currentVersion" : 5,
	"clusterId" : ObjectId("533c6d664fe3c29ccff63fc2")
}
  shards:
	{  "_id" : "config",  "host" : "config/sv.local:30011,sv.local:30012,sv.local:30013" }
	{  "_id" : "shard2",  "host" : "shard2/sv.local:30021,sv.local:30022,sv.local:30023" }
	{  "_id" : "shard3",  "host" : "shard3/sv.local:30031,sv.local:30032,sv.local:30033" }
  databases:
	{  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
	{  "_id" : "test",  "partitioned" : true,  "primary" : "shard2" }
		test.test
			shard key: { "x" : 1 }
			chunks:
				shard2	4
				shard3	5
			{ "x" : { "$minKey" : 1 } } -->> { "x" : 0 } on : shard2 Timestamp(2, 1)
			{ "x" : 0 } -->> { "x" : 33 } on : shard2 Timestamp(1, 3)
			{ "x" : 33 } -->> { "x" : 111 } on : shard2 Timestamp(3, 0)
			{ "x" : 111 } -->> { "x" : 190 } on : shard2 Timestamp(4, 0)
			{ "x" : 190 } -->> { "x" : 269 } on : shard3 Timestamp(4, 1)
			{ "x" : 269 } -->> { "x" : 347 } on : shard3 Timestamp(2, 8)
			{ "x" : 347 } -->> { "x" : 783 } on : shard3 Timestamp(3, 2)
			{ "x" : 783 } -->> { "x" : 863 } on : shard3 Timestamp(3, 4)
			{ "x" : 863 } -->> { "x" : { "$maxKey" : 1 } } on : shard3 Timestamp(3, 5)
 
mongos>

I saw in the logs:

2014-04-02T15:34:32.347-0400 [WriteBackListener-sv.local:20001] warning: Monitor not found for a known shard: config

For one of my previous attempts (although I didn't see it for the one where I have the sharding status shown above).



 Comments   
Comment by Janna Golden [ 28/Jan/19 ]

I haven't been able to reproduce this in 3.6, 4.0, or master as we disallow naming a shard "config" so am closing as gone away.

Comment by Kaloian Manassiev [ 24/Jan/19 ]

janna.golden, since you are looking at that code path now, I am assigning SERVER-13464 and SERVER-13465 to you to check whether they are still a problem starting in 3.6, where we threw out the DBClientMultiCommand.

Please close them if they are no longer reproducible.

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