[SERVER-57310] record creation date of mongos Created: 31/May/21  Updated: 29/Oct/23  Resolved: 10/Nov/21

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

Type: Question Priority: Major - P3
Reporter: Jennifer Huang (Inactive) Assignee: Israel Hsu
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-14924 Investigate changes in SERVER-57310: ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-09-20, Sharding 2021-10-04, Sharding 2021-10-18, Sharding 2021-11-01, Sharding 2021-11-15
Participants:
Case:

 Description   

It'll be nice if we can store the creation date of each MongoS in the mongos collections.

mongos> db.getSiblingDB("config").mongos.find().pretty()
{
	"_id" : "hostname.local:27017",
	"advisoryHostFQDNs" : [
		"hostname.local"
	],
	"mongoVersion" : "4.4.5",
        "created": ISODate("2021-05-31T11:42:24.629Z"),
	"ping" : ISODate("2021-05-31T11:42:24.629Z"),
	"up" : NumberLong(430953),
	"waiting" : true
}

This could just be the time when the mongos document is created.

Sometimes, this kind of info help Devops or DBAs investigate environmental issues etc, with the CSRS and shards, we can get the creation date of the replica set from the replica set ID, but we don't have a way to tell MongoS creation date reliably.



 Comments   
Comment by Israel Hsu [ 10/Nov/21 ]

Summary: We added an optional field to MongosType called "created"; it is a Date field that gives the time when the MongoS instance started.

Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'Israel Hsu', 'email': 'israel.hsu@mongodb.com', 'username': 'israelhsu'}

Message: SERVER-57310 record creation date of mongos
Branch: master
https://github.com/mongodb/mongo/commit/5e5ec4c7dc951ebd2d22c01275fe44c8991a1087

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