[SERVER-6991] Add pool stats for ShardedConnection Created: 10/Sep/12  Updated: 27/Oct/15  Resolved: 18/Mar/13

Status: Closed
Project: Core Server
Component/s: Diagnostics, Sharding
Affects Version/s: None
Fix Version/s: 2.2.4, 2.4.2, 2.5.0

Type: New Feature Priority: Major - P3
Reporter: Randolph Tan Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-8812 connPoolStats and connPoolSync should... Closed
Related
related to DOCS-1365 new shardConnPoolStats command relate... Closed
related to SERVER-9022 Enable mongos mode which releases Sha... Closed
is related to SERVER-6611 Add a new field in connPoolStats to i... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Currently, the connPoolStats will only get stats from the extern pool object. This is linked to the pool ScopedDBConnection uses and it does not include the shardConnectionPool.

Add a new command called "shardConnPoolStats" which will show information on the per thread (incoming connection) connection status. Sample output for a sharded cluster with a single replica set below:

mongos> db.runCommand( { 'shardConnPoolStats': 1 } )
{
	"hosts" : {
		"test-rs0/dan-tm2:31100,dan-tm2:31101,dan-tm2:31102::0" : {
			"available" : 0,
			"created" : 2
		}
	},
	"replicaSets" : {
		"test-rs0" : {
			"hosts" : [
				{
					"addr" : "dan-tm2:31100",
					"ok" : true,
					"ismaster" : true,
					"hidden" : false,
					"secondary" : false,
					"pingTimeMillis" : 0
				},
				{
					"addr" : "dan-tm2:31101",
					"ok" : true,
					"ismaster" : false,
					"hidden" : false,
					"secondary" : true,
					"pingTimeMillis" : 0
				},
				{
					"addr" : "dan-tm2:31102",
					"ok" : true,
					"ismaster" : false,
					"hidden" : false,
					"secondary" : true,
					"pingTimeMillis" : 0
				}
			],
			"master" : 0,
			"nextSlave" : 0
		}
	},
	"createdByType" : {
		"set" : 2
	},
	"totalAvailable" : 0,
	"totalCreated" : 2,
	"threads" : [
		{
			"hosts" : [
				{
					"host" : "test-rs0/dan-tm2:31100,dan-tm2:31101,dan-tm2:31102",
					"created" : NumberLong(1),
					"avail" : true
				}
			],
			"seenNS" : [
				"test.data"
			]
		},
		{
			"hosts" : [
				{
					"host" : "test-rs0/dan-tm2:31100,dan-tm2:31101,dan-tm2:31102",
					"created" : NumberLong(1),
					"avail" : true
				}
			],
			"seenNS" : [
				"test.data"
			]
		}
	],
	"ok" : 1
}



 Comments   
Comment by auto [ 20/Mar/13 ]

Author:

{u'date': u'2013-03-20T16:26:48Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-6991 better stats for sharded connections and sharded conn pool
Branch: v2.2
https://github.com/mongodb/mongo/commit/861863ac17feb7ae598f640919a1fc8ba71ce421

Comment by auto [ 20/Mar/13 ]

Author:

{u'date': u'2013-03-14T19:03:03Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-6991 allow releasing sharded conn back to pool after read operation
Branch: v2.4
https://github.com/mongodb/mongo/commit/1b8a70243686a7d4bf078bbd0e438f3faa95790b

Comment by auto [ 20/Mar/13 ]

Author:

{u'date': u'2013-03-14T18:05:02Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-6991 better stats for sharded connections and sharded conn pool
Branch: v2.4
https://github.com/mongodb/mongo/commit/1dc86f438b4e21d30f1592636af433d5faf5647b

Comment by auto [ 19/Mar/13 ]

Author:

{u'date': u'2013-03-14T19:03:03Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-6991 allow releasing sharded conn back to pool after read operation
Branch: master
https://github.com/mongodb/mongo/commit/706459a8af0b278609d70e7122595243df6aeee8

Comment by auto [ 18/Mar/13 ]

Author:

{u'date': u'2013-03-14T18:05:02Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-6991 better stats for sharded connections and sharded conn pool
Branch: master
https://github.com/mongodb/mongo/commit/d2d811ebb5f50307e41601c26cb300a7e884b98f

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