[SERVER-23287] Cleanup replSetGetStatus output/code (field names) Created: 22/Mar/16  Updated: 14/Apr/16  Resolved: 27/Mar/16

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

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Scott Hernandez (Inactive)
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-22337 Report lastAppliedAndJournaledOptime ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 12 (04/01/16)
Participants:

 Description   
  • rename "OpTime" field to "opTimes"
  • add more optimes into field
    • durable
    • applied
  • use helper to append OpTime to output
  • fix tests

> rs.status()
{
	"set" : "test",
	"date" : ISODate("2016-03-22T15:34:03.033Z"),
	"myState" : 1,
	"term" : NumberLong(3),
	"heartbeatIntervalMillis" : NumberLong(2000),
	"OpTimes" : {
		"lastCommittedOpTime" : {
			"ts" : Timestamp(1458660832, 1),
			"t" : NumberLong(3)
		}},
	"members" : [
		{
			"_id" : 0,
			"name" : "tart.local:27017",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 14,
			"optime" : {
				"ts" : Timestamp(1458660832, 1),
				"t" : NumberLong(3)
			},
			"optimeDate" : ISODate("2016-03-22T15:33:52Z"),
			"infoMessage" : "could not find member to sync from",
			"electionTime" : Timestamp(1458660831, 1),
			"electionDate" : ISODate("2016-03-22T15:33:51Z"),
			"configVersion" : 1,
			"self" : true



 Comments   
Comment by Githook User [ 27/Mar/16 ]

Author:

{u'name': u'Scott Hernandez', u'email': u'scotthernandez@tart.local'}

Message: SERVER-23287: Cleanup replSetGetStatus output/code (field names)
Branch: master
https://github.com/mongodb/mongo/commit/bd7ee60bcc37645eb0d0c7d4e9a76909aeb23706

Comment by Scott Hernandez (Inactive) [ 22/Mar/16 ]

New output:

> rs.status()
{
	"set" : "test",
	"date" : ISODate("2016-03-22T15:36:01.075Z"),
	"myState" : 1,
	"term" : NumberLong(4),
	"heartbeatIntervalMillis" : NumberLong(2000),
	"optimes" : {
		"lastCommittedOpTime" : {
			"ts" : Timestamp(1458660954, 1),
			"t" : NumberLong(4)
		},
		"appliedOpTime" : {
			"ts" : Timestamp(1458660954, 1),
			"t" : NumberLong(4)
		},
		"durableOpTime" : {
			"ts" : Timestamp(1458660954, 1),
			"t" : NumberLong(4)
		}
	},
	"members" : [
		{
			"_id" : 0,
			"name" : "tart.local:27017",
			"health" : 1,
			"state" : 1,
			"stateStr" : "PRIMARY",
			"uptime" : 9,
			"optime" : {
				"ts" : Timestamp(1458660954, 1),
				"t" : NumberLong(4)
			},
			"optimeDate" : ISODate("2016-03-22T15:35:54Z"),
			"infoMessage" : "could not find member to sync from",
			"electionTime" : Timestamp(1458660953, 1),
			"electionDate" : ISODate("2016-03-22T15:35:53Z"),
			"configVersion" : 1,
			"self" : true

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