Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13227

pingTimeMillis in connPoolStats overflows when unset

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Service Arch
    • ALL

      Before the ping time is explicitly set, the ping time is apparently max(int64). This gets reported badly via (shard)connPoolStats.

      Example:

      {
      	"hosts" : {
      		"nuwen:29000::0" : {
      			"available" : 1,
      			"created" : 1
      		},
      		"nuwen:29000::30" : {
      			"available" : 2,
      			"created" : 3
      		},
      		"nuwen:31100::0" : {
      			"available" : 0,
      			"created" : 1
      		},
      		"nuwen:31100::5" : {
      			"available" : 1,
      			"created" : 1
      		},
      		"test-rs0/nuwen:31100,nuwen:31101,nuwen:31102::0" : {
      			"available" : 1,
      			"created" : 1
      		}
      	},
      	"replicaSets" : {
      		"test-rs0" : {
      			"hosts" : [
      				{
      					"addr" : "nuwen:31100",
      					"ok" : true,
      					"ismaster" : true,
      					"hidden" : false,
      					"secondary" : false,
      					"pingTimeMillis" : 0
      				},
      				{
      					"addr" : "nuwen:31101",
      					"ok" : false,
      					"ismaster" : false,
      					"hidden" : false,
      					"secondary" : false,
      					"pingTimeMillis" : -1511828489
      				},
      				{
      					"addr" : "nuwen:31102",
      					"ok" : false,
      					"ismaster" : false,
      					"hidden" : false,
      					"secondary" : false,
      					"pingTimeMillis" : -1511828489
      				}
      			]
      		}
      	},
      	"createdByType" : {
      		"master" : 6,
      		"set" : 1
      	},
      	"totalAvailable" : 5,
      	"totalCreated" : 7,
      	"numDBClientConnection" : 8,
      	"numAScopedConnection" : 2,
      	"ok" : 1
      }
      

      One potential solution would be to use a negative sentinel value, since time must always be positive.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            greg_10gen Greg Studer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: