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

Remove "targetIndex" from ReplicationCoordinatorImpl::_handleHeartbeatResponse()

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • None
    • Repl 2020-10-19

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-repl Backlog - Replication Team
              suganthi.mani@mongodb.com Suganthi Mani
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: