[SERVER-13227] pingTimeMillis in connPoolStats overflows when unset Created: 17/Mar/14  Updated: 06/Dec/22  Resolved: 03/Jan/19

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

Type: Bug Priority: Minor - P4
Reporter: Greg Studer Assignee: Backlog - Service Architecture
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-16440 replica set monitor can display negat... Closed
Assigned Teams:
Service Arch
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Kaloian Manassiev [ 03/Jan/19 ]

redbeard0531, since you are working on the RSM, can you please check whether this is still a problem?

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