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

replSetReconfig command should check if the node is primary before no-op write

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6
    • Sprint:
      Repl 2020-05-04, Repl 2020-05-18

      Description

      The replSetReconfig command does a no-op write, but does not check that the node is still primary before doing so. Since the command only takes a lock when writing down the config document, it is possible for the primary to stepdown and transition to secondary before doing this no-op write.

      We end up calling onInternalOpMessage, which will pass in an empty namespace. Because of this, we don't actually do the primary check in _logOpsInner. This would mean that we can allow the reconfig no-op write to occur on a secondary.

      This is tracked separately from SERVER-47142 since we would like to backport this change to 4.2 and earlier affected versions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              siyuan.zhou Siyuan Zhou
              Reporter:
              pavithra.vetriselvan Pavithra Vetriselvan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: