BulkWriteError's request is not the correct one

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.2.1
    • Affects Version/s: 1.2.0
    • Component/s: Error Handling
    • None
    • Environment:
      mongo 3.4
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

       

       

            Assignee:
            Go Community User
            Reporter:
            emilien puget
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: