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

Add more information to writeconcern timeout error

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None

      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"
      	}
      })
      

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

              Created:
              Updated:
              Resolved: