[SERVER-37739] Remove ReplicationCoordinator::isMasterForReportingPurposes() Created: 24/Oct/18  Updated: 06/Dec/22

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

Type: Improvement Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Participants:

 Description   

ReplicationCoordinator::isMasterForReportingPurposes() is only used in appendReplicationInfo() and for SNMP (in IsMasterCallback). Since we've removed master and slave, we can get rid of the dead code. SNMP will need to get the result in other ways.

redbeard0531 found that ReplicationCoordinator::isMasterForReportingPurposes() reports a wrong result if the node is in catchup mode or drain mode.



 Comments   
Comment by Siyuan Zhou [ 29/Oct/18 ]

ReplicationCoordinator::fillIsMasterForReplSet() should be used instead in SNMP, which handles catchup mode and drain mode correctly.

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