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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.3, 3.3.1
    • Sharding
    • None
    • ALL
    • Sharding 11 (03/11/16)
    • 0

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: