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

Avoid interruption exception in tryAcquire when there is no wait.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 3.5.0
    • None
    • None

    Description

      When using the mongo-java-driver-reactivestream with RxJava2, sometimes the driver throws MongoInterruptedException due to RxJava2 interrupts the thread when disposed. See discussion on the RxJava2 side: ReactiveX/RxJava#5711

      RxJava developers recommend the callbacks should not be interrupt sensitive. By changing the tryAcquire(0, TimeUnit) to tryAcquire(), it would not throw InterruptedException.

      PR: https://github.com/mongodb/mongo-java-driver/pull/428

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: