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

Stream pipeline blocks if filterKeys() gets a set where no key matches

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 13.0.9.Final, 14.0.0.Final
    • 13.0.6.Final, 14.0.0.Final
    • Core
    • None

      When the set used for filtering via filterKeys(set) happens to only contain non-matching keys, then the pipeline makes no progress and blocks the calling thread.

      NOTE: This only applies, if the reduction is done without an identity element, i.e. null is used under the hood.

      Additionally an NPE is thrown when a remote node returns null as final result (when it no longer blocks).

      Caused by: java.lang.NullPointerException: The CompletionStage terminated with null.
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      	at org.infinispan.marshall.exts.ThrowableExternalizer.readGenericThrowable(ThrowableExternalizer.java:282)
      

      The pull request contains a unit-test that proofs those points.

              wburns@redhat.com Will Burns
              heli80 Helmut Jelinek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: