[SERVER-16440] replica set monitor can display negative ping times Created: 05/Dec/14  Updated: 03/Jan/19  Resolved: 05/Dec/14

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 2.8.0-rc3

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-13227 pingTimeMillis in connPoolStats overf... Closed
Operating System: ALL
Participants:

 Description   

We're casting an int64 to an int32, which would be fine most of the time. Unfortunately, we're using int64_t::max() to represent "unknown" ping time, which can occur with some frequency.



 Comments   
Comment by Githook User [ 05/Dec/14 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-16440 cap displayed ping times in replica set monitor
Branch: master
https://github.com/mongodb/mongo/commit/6793360d470f8f71bd0218af9cd3a32ff11c4496

Comment by Eric Milkie [ 05/Dec/14 ]

Before fix:

		{
			"addr" : "lazarus:31101",
			"ok" : false,
			"ismaster" : false,
			"hidden" : false,
			"secondary" : false,
			"pingTimeMillis" : -1511828489
		},

After:

		{
			"addr" : "lazarus:31102",
			"ok" : false,
			"ismaster" : false,
			"hidden" : false,
			"secondary" : false,
			"pingTimeMillis" : 2147483647
		}

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