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

Race in write_concern_after_stepdown.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.9, 4.4.1, 4.7.0
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • 32

      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 ]

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            0 Vote for this issue
            1 Start watching this issue