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

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

      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.

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

              Created:
              Updated:
              Resolved: