Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10943

Handle thread pool queue rejection when invoking rxjava code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 10.1.0.Beta1
    • None
    • Core
    • None

    Description

      Currently the BlockingRejectedExecutionHandler throws a Rejected exception at https://github.com/infinispan/infinispan/blob/master/commons/src/main/java/org/infinispan/commons/util/concurrent/BlockingRejectedExecutionHandler.java#L38 when a non blocking thread can't pass a task to the blocking queue.

      Unfortunately in rxjava 2 they catch the exception and log it and do nothing else at https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/internal/schedulers/ExecutorScheduler.java#L175. This leads to having a publisher that never completes.

      We should be able to throw a different exception, not RejectedExecutionException, and rxjava2 should catch and properly set it in the publisher to prevent this from happening.

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            wburns@redhat.com Will Burns
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: