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

Handle thread pool queue rejection when invoking rxjava code

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 10.1.0.Beta1
    • Component/s: Core
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                william.burns Will Burns
                Reporter:
                william.burns Will Burns
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: