Remove "targetIndex" from ReplicationCoordinatorImpl::_handleHeartbeatResponse()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Repl 2020-10-19
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      This code cleanup was caught duringĀ SERVER-46379. We should remove 'targetIndex' from ReplicationCoordinatorImpl::_handleHeartbeatResponse() to avoid any future mistakes of accessing "targetIndex" in that function, that can lead to server crash. Using targetIndex in replicationCoordinatorImpl::_handleHeartbeatResponse() is not safe because
      targetIndex is the target's member index when the heartbeat was sent out by the node. But, a reconfig can make the target's member index to change the when the heart beat response was received by the node. So, ReplicationCoordinatorImpl::_handleHeartbeatResponse() should alway's use target's host and port to access member data from the in-memory config.

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: