Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2821

Don't return "ErrUnacknowledgedWrite" when using an unacknowledged write concern

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • 2.0.0
    • None
    • CRUD
    • None

    Description

      Currently, the Go driver returns mongo.ErrUnacknowledgedWrite for any write operation performed with an unacknowledged write concern. That makes handling errors difficult because you have to explicitly check for and discard mongo.ErrUnacknowledgedWrite. Instead, we should just return a nil result and a nil error if everything worked (i.e. if there were no observed errors).

      Definition of done:

      • Remove mongo.ErrUnacknowledgedWrite.
      • Add an Acknowledged bool to all write result types (e.g. InsertOneResult, BulkWriteResult, etc) to indicate whether or not the result information is from an unacknowledged write.

      Attachments

        Activity

          People

            preston.vasquez@mongodb.com Preston Vasquez
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: