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

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Replication
    • ALL

      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.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            william.schultz@mongodb.com William Schultz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: