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

Majority writes against the CSRS config server should check the write concern was satisfied

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.3, 3.3.1
    • Component/s: Sharding
    • None
    • ALL
    • Sharding 11 (03/11/16)
    • 0
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Majority writes, which succeed doing the local write, but fail to wait for write concern will return 'ok: 1', but will contain a writeConcern section:

      testReplSet:PRIMARY> db.runCommand({ insert: 'TestColl', documents: [ { Key: 3, Value: 'Value 3' } ], writeConcern: { w: 'majority', wtimeout: 2000 } });
      {
              "ok" : 1,
              "n" : 1,
              "opTime" : {
                      "ts" : Timestamp(1455914253, 1),
                      "t" : NumberLong(4)
              },
              "electionId" : ObjectId("7fffffff0000000000000004"),
              "writeConcernError" : {
                      "code" : 64,
                      "errInfo" : {
                              "wtimeout" : true
                      },
                      "errmsg" : "waiting for replication timed out"
              }
      }
      

      The sharding registry write commands should check for write concern failure and retry if necessary.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: