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

BulkWriteError's request is not the correct one

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.2.1
    • 1.2.0
    • Error Handling
    • None
    • mongo 3.4

    Description

      When initializing the BulkWriteError, the document set is not the correct one, the first document of the batch is used instead, it should used the document in the batch at the index returned by the WriteError (https://github.com/mongodb/mongo-go-driver/blob/b414b897457665f12997cefd10ad934ccb9dfb3e/mongo/errors.go#L129)

      https://github.com/mongodb/mongo-go-driver/blob/b414b897457665f12997cefd10ad934ccb9dfb3e/mongo/bulk_write.go#L156

       

       

      Attachments

        Activity

          People

            go-community-user Go Community User
            emilien@sendinblue.com emilien puget
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: