Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48793

Remove "targetIndex" from ReplicationCoordinatorImpl::_handleHeartbeatResponse()

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

      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:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: