JAVA-6087In Code Review

RetryableWriteError label not preserved for retryable writeConcernError

In MixedBulkWriteOperation, when we decide to attach RetryableWriteError for a retryable write concern failure (e.g., last-attempt path), the label is currently written to the {*}writeConcernErro{*}r subdocument. However, when building MongoBulkWriteException, BulkWriteBatch.getBulkWriteException() reads labels from the top-level {*}result.errorLabels{*}. Labels added under *writeConcernError* are not parsed, so they are lost. *Impact* Applications checking e.hasErrorLabel("RetryableWriteErr

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.