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

XMLWordPrintableJSON

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

      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
            Reporter:
            Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: