MixedBulkWriteOperation may report incorrect server address in exceptions

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Bulk API
    • None
    • Java Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      • All BulkWriteBatch es created via BulkWriteBatch.getNextBatch use the same ConnectionDescription as the first batch, despite not necessarily being executed using the same connection. This means, BulkWriteBatch.getBulkWriteException/BulkWriteBatchCombiner.getErrorNonNullable create exceptions with potentially incorrect ServerAddress es.
        • The code behaved this way since the introduction of retryable writes.
      • Another driver-by improvement we could do, is to start using SessionContext instead of OperationContext in BulkWriteBatch, as it does not need OperationContext.

      Addressing the source code notes tagged with TODO-JAVA-6223 is in scope of this ticket.

            Assignee:
            Unassigned
            Reporter:
            Valentin Kavalenka
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: