[SERVER-14528] Move HostAndPort::me functionality out of HostAndPort type. Created: 11/Jul/14  Updated: 11/Jul/16  Resolved: 11/Jul/14

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

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The HostAndPort type is just a representation of the address of a service on the network. The me() functionality is really about inspecting the current server process to determine its own best identity. This functionality is not about naming in general, but about naming the running server in particular, and so doesn't belong in the HostAndPort type and library.

The only consumer of this information is replication when you initiate a replica set with no config information, in part because the result of HostAndPort::me() is not always the best name for a node. For now, we should move the behavior into the consumer, and consider eliminating or improving it later.



 Comments   
Comment by Githook User [ 11/Jul/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-14528 Move HostAndPort::me into a file-local method in LegacyReplCoordinator.
Branch: master
https://github.com/mongodb/mongo/commit/9dbdefb125b07db9d9801b80d525f9a954bec5f2

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