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

Don't get exceptions from driver when Write concern not met.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 3.2.0
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Public
    • Labels:
      None

      Description

      Writing to a 3.2 Database - either a replica set or a sharded cluster.

      Where the write concern cannot be satisfied - for example 1 + Arbiter all that is remaining in 2 + A cluster and a write concern of 2 I get no exceptions thrown when calling MongoCollection.bulkWrite().

      If I have a hard error - such as no primary I get an exception - but anywhere I would expect that the BulkWriteException.WriteConcernError is populated - no exception is thrown.

      Also - when submitting a batch and where I have continueOnError enabled, and unordered operations - I would expect an exception to be thrown but to be able to see the failure reason for each operations - similar to this [ https://docs.mongodb.org/manual/reference/method/BulkWriteResult/ ] , how do I get similar functionality through he Java driver?

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            john.page John Page
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: