[DOCS-9297] replSetGetStatus.members[n].uptime name is confusing and definition also needs to be revised Created: 10/Nov/16  Updated: 30/Oct/23  Resolved: 22/Nov/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Nishant Bhardwaj Assignee: David Hou
Resolution: Won't Do Votes: 0
Labels: reopened, triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 11 weeks, 1 day ago
Epic Link: DOCSP-1769

 Description   

The uptime field definition as per the docs is :

The uptime field holds a value that reflects the number of seconds that this member has been online.

This value does not appear for the member that returns the rs.status() data.

This needs to be refined.

This field represents the peer connection uptime value from the perspective of the node from which you run rs.status() command. The uptime field holds a value that reflects the number of seconds that this member has been online from the perspective of the member that returns the rs.status() data.

shard02:SECONDARY> rs.status()
{
	"set" : "shard02",
	"date" : ISODate("2016-11-10T08:58:24.564Z"),
	"myState" : 2,
	"members" : [
		{
			"_id" : 0,
			"name" : "Nishants-MacBook-Pro.local:27022",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 428,
			"optime" : Timestamp(1478679667, 1),
			"optimeDate" : ISODate("2016-11-09T08:21:07Z"),
			"lastHeartbeat" : ISODate("2016-11-10T08:58:23.121Z"),
			"lastHeartbeatRecv" : ISODate("2016-11-10T08:58:22.687Z"),
			"pingMs" : 0,
			"electionTime" : Timestamp(1478757759, 1),
			"electionDate" : ISODate("2016-11-10T06:02:39Z"),
			"configVersion" : 1
		},
		{
			"_id" : 1,
			"name" : "Nishants-MacBook-Pro.local:27023",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 428,
			"optime" : Timestamp(1478679667, 1),
			"optimeDate" : ISODate("2016-11-09T08:21:07Z"),
			"configVersion" : 1,
			"self" : true
		},
		{
			"_id" : 2,
			"name" : "Nishants-MacBook-Pro.local:27024",
			"health" : 1,
			"state" : 7,
			"stateStr" : "ARBITER",
			"uptime" : 428,
			"lastHeartbeat" : ISODate("2016-11-10T08:58:23.121Z"),
			"lastHeartbeatRecv" : ISODate("2016-11-10T08:58:22.687Z"),
			"pingMs" : 0,
			"configVersion" : 1
		}
	],
	"ok" : 1
}
shard02:SECONDARY> use admin
switched to db admin
shard02:SECONDARY> db.shutdownServer()
server should be down...
> exit
bye
 
shard02:SECONDARY> rs.status()
{
	"set" : "shard02",
	"date" : ISODate("2016-11-10T08:59:08.586Z"),
	"myState" : 2,
	"members" : [
		{
			"_id" : 0,
			"name" : "Nishants-MacBook-Pro.local:27022",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 4,
			"optime" : Timestamp(1478679667, 1),
			"optimeDate" : ISODate("2016-11-09T08:21:07Z"),
			"lastHeartbeat" : ISODate("2016-11-10T08:59:07.872Z"),
			"lastHeartbeatRecv" : ISODate("2016-11-10T08:59:06.932Z"),
			"pingMs" : 0,
			"electionTime" : Timestamp(1478757759, 1),
			"electionDate" : ISODate("2016-11-10T06:02:39Z"),
			"configVersion" : 1
		},
		{
			"_id" : 1,
			"name" : "Nishants-MacBook-Pro.local:27023",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 5,
			"optime" : Timestamp(1478679667, 1),
			"optimeDate" : ISODate("2016-11-09T08:21:07Z"),
			"configVersion" : 1,
			"self" : true
		},
		{
			"_id" : 2,
			"name" : "Nishants-MacBook-Pro.local:27024",
			"health" : 1,
			"state" : 7,
			"stateStr" : "ARBITER",
			"uptime" : 4,
			"lastHeartbeat" : ISODate("2016-11-10T08:59:07.872Z"),
			"lastHeartbeatRecv" : ISODate("2016-11-10T08:59:06.932Z"),
			"pingMs" : 0,
			"configVersion" : 1
		}
	],
	"ok" : 1
}
shard02:SECONDARY> 

Situation is different on Primary.

shard02:PRIMARY> rs.status()
{
	"set" : "shard02",
	"date" : ISODate("2016-11-10T09:03:20.443Z"),
	"myState" : 1,
	"members" : [
		{
			"_id" : 0,
			"name" : "Nishants-MacBook-Pro.local:27022",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 10843,
			"optime" : Timestamp(1478679667, 1),
			"optimeDate" : ISODate("2016-11-09T08:21:07Z"),
			"electionTime" : Timestamp(1478757759, 1),
			"electionDate" : ISODate("2016-11-10T06:02:39Z"),
			"configVersion" : 1,
			"self" : true
		},
		{
			"_id" : 1,
			"name" : "Nishants-MacBook-Pro.local:27023",
			"health" : 1,
			"state" : 2,
			"stateStr" : "SECONDARY",
			"uptime" : 255,
			"optime" : Timestamp(1478679667, 1),
			"optimeDate" : ISODate("2016-11-09T08:21:07Z"),
			"lastHeartbeat" : ISODate("2016-11-10T09:03:19.396Z"),
			"lastHeartbeatRecv" : ISODate("2016-11-10T09:03:20.328Z"),
			"pingMs" : 0,
			"configVersion" : 1
		},
		{
			"_id" : 2,
			"name" : "Nishants-MacBook-Pro.local:27024",
			"health" : 1,
			"state" : 7,
			"stateStr" : "ARBITER",
			"uptime" : 10841,
			"lastHeartbeat" : ISODate("2016-11-10T09:03:19.102Z"),
			"lastHeartbeatRecv" : ISODate("2016-11-10T09:03:19.102Z"),
			"pingMs" : 0,
			"configVersion" : 1
		}
	],
	"ok" : 1
}
shard02:PRIMARY> 



 Comments   
Comment by David Hou [ 22/Nov/22 ]

Hi nishant.bhardwaj@mongodb.com, thanks for investigating. We no longer maintain the docs for legacy versions. At the top, they have a banner saying that they are archived. I will be closing this ticket as "Won't Do," but let me know if you have any questions!

Comment by Nishant Bhardwaj [ 22/Nov/22 ]

Hi david.hou@mongodb.com, this is a long running case and changes happened over time.

  • the documentation for current releases(4.2,4.4,5.0,6.0,6.1) has correct definition for uptime:

    For the member on which the replSetGetStatus command is run, uptime is the the number of seconds the member has been online.

    For the other members, uptime is the number of seconds the member has been in continuous communication with the member on which the replSetGetStatus command was run.

However, the legacy docs still have the earlier incorrect definition of uptime. Hence, only the legacy docs branch need to be updated and the text should be the same as above.

Comment by David Hou [ 18/Nov/22 ]

Hi nishant.bhardwaj@mongodb.com, when you get a chance can you review the PR for this? https://github.com/10gen/docs-mongodb-internal/pull/2155

Comment by Sarah Olson [ 02/Nov/22 ]

Thanks very much for the feedback luke.prochazka@mongodb.com

Comment by Luke Prochazka [ 01/Nov/22 ]

Inappropriately closed by the bot, request is still looking for an update from the DOCS team.

Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 07:58:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.