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

Add more information to writeconcern timeout error

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Trivial - P5 Trivial - P5
    • None
    • None
    • Replication
    • None

    Description

      When I insert single document with writeconcern w: with value bigger than my replSet count and I use wtimeout, I (of course) get error message:

      WriteResult({
      	"nInserted" : 1,
      	"writeConcernError" : {
      		"code" : 64,
      		"errInfo" : {
      			"wtimeout" : true
      		},
      		"errmsg" : "waiting for replication timed out"
      	}
      })

      It would be nice to have value there, what tell how many acknowledges WAS returned before wtimeout occurred.

      Like:

      WriteResult({
      	"nInserted" : 1,
              "nAcknowledged" : 3,
      	"writeConcernError" : {
      		"code" : 64,
      		"errInfo" : {
      			"wtimeout" : true
      		},
      		"errmsg" : "waiting for replication timed out"
      	}
      })

      Attachments

        Activity

          People

            milkie@mongodb.com Eric Milkie
            jjussi Jussi Jaaskelainen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: