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

ReplicationCoordinator::awaitReplication should fail with correct error if called on a non-primary node

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Replication
    • Replication
    • ALL

    Description

      The comments of ReplicationCoordinator::awaitReplication indicate that a NotMaster error code should be returned if called on a node that is not in primary state. The method's logic, however, does not align with this. If called from a secondary, the method will trivially fail with a PrimarySteppedDown error message, which seems incorrect. We should fix this and make sure to clarify this method's pre-condition i.e. that it is only valid to call it on a primary node, if that is the intended behavior.

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            william.schultz@mongodb.com William Schultz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: