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

Race in write_concern_after_stepdown.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.9, 4.4.1, 4.7.0
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2
    • Linked BF Score:
      32

      Description

      We expect the parallel shell to begin a w: majority write on Node 0, while Node 0 is primary and replication is blocked. Then Node 0 steps down and the parallel shell expects to receive PrimarySteppedDown.

      In fact, the parallel shell took a long time to begin. It finally connected after Node 0 had already stepped down. When it began its w: majority write it received

      w:majority write replied: {
        "ok" : 0,
        "errmsg" : "not master",
        "code" : 10107,
        "codeName" : "NotMaster"
      }
      

      This is not a "write error" but a generic command failure, so when the shell calls assert.writeErrorWithCode it logs unhelpfully:

      assert: found code(s) [ ] does not match any of the expecte d codes [ 189, 11602 ]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jesse A. Jesse Jiryu Davis
              Reporter:
              jesse A. Jesse Jiryu Davis
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: