[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: |
|
||||
| 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. |