Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4421

Deprecate WriteConcernError errorLabels property

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.5.0
    • Affects Version/s: None
    • Component/s: Error Handling
    • None
    • Fully Compatible
    • Not Needed

      Currently the com.mongodb.bulk.WriteConcernError contains a Set<String property for error labels, based on a faulty assumption (based on our spec tests) that the writeConcernError document in the server response contains errorLabels, when in fact they are included as a field in the top-level response document. This has led to bugs, the known ones having been fixed in JAVA-4419, and some confusing code. Let's deprecate com.mongodb.bulk.WriteConcernError#errorLabels to start the process of getting rid of this.

      Eventually we will also want to do the following:

      1. Consolidate errorLabel handing in MongoWriteConcernException, since currently they are added by the code that constructs MongoWriteConcernException. This will require a new constructor for that exception, and the others can be deprecated.
      2. Refactor code that creates instances of com.mongodb.bulk.WriteConcernError to stop relying on the errorLabels property

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: