|
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:
- 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.
- Refactor code that creates instances of com.mongodb.bulk.WriteConcernError to stop relying on the errorLabels property
|