[SERVER-21597] Fix connPoolStats command to work with many TaskExecutor-NetworkInterface pairs Created: 20/Nov/15  Updated: 17/May/19  Resolved: 14/Dec/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.2.0-rc4
Fix Version/s: 3.2.3, 3.3.0

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Samantha Ritter (Inactive)
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-6767 Comment on: "manual/reference/command... Closed
Related
related to SERVER-20283 connPoolStats command does not includ... Closed
is related to SERVER-21674 Change connPoolStats command to retur... Closed
is related to SERVER-20944 Contention on ThreadPoolTaskExecutor:... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Completed:
Sprint: Platform D (12/11/15), Platforms E (01/08/16)
Participants:

 Description   

With the completion of SERVER-20944 the results of the connPoolStats command are no longer correct. The command must be changed to collect statistics from all executors in the TaskExecutor pool, for sharded systems. Rather than reporting on each connection pool individually, since many of these pools are sharing workloads, connPoolStats should aggregate and report information from all connection pools within the server.

This work changes the output format of the command to the following:

{
        "numClientConnections" : 22,
        "numAScopedConnections" : 0,
        "totalInUse" : 1,
        "totalAvailable" : 2,
        "totalCreated" : 3,
        "hosts" : {
                "localhost:27018" : {
                        "inUse" : 0,
                        "available" : 2,
                        "created" : 2
                },
                "localhost:27017" : {
                        "inUse" : 1,
                        "available" : 0,
                        "created" : 1
                }
        },
        "replicaSets" : {
        },
        "ok" : 1
}

This new format is similar to the 3.0 formatting, but differs in the following ways:

  • the reported stats are aggregated across all connection pools in the server
  • the createdByType field has been removed (see SERVER-20283)
  • a new field, totalInUse, reports the number of connections currently in use across all pools
  • within each host's stats, the new inUse field reports the number of connections currently in use across all pools for this particular host

SERVER-21674 documents a possible future feature to report connection stats separately for each connection pool instead of aggregating these statistics.



 Comments   
Comment by Githook User [ 29/Jan/16 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-21597 Fix connPoolStats to work with many NetworkInterfaces

(cherry picked from commit 7c67e25f37853c60c106d2cf08eca1b81c4133ae)
Branch: v3.2
https://github.com/mongodb/mongo/commit/c96e8cacf35cf327ba7061cc1aaba997a566a300

Comment by Githook User [ 14/Dec/15 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-21597 Fix connPoolStats to work with many NetworkInterfaces
Branch: master
https://github.com/mongodb/mongo/commit/7c67e25f37853c60c106d2cf08eca1b81c4133ae

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