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

Distributed cache streams with collectors ignore distributedBatchSize


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 14.0.0.Final
    • 13.0.1.Final
    • Core, Streams
    • None

      When a collector is used, the distributed streams behave as if the result is "reduced", expecting the collector result to be comparable in size to a cache value.

      Most collectors do not reduce the value size at all, e.g. stream.collect(CacheCollectors.serializableCollector(() -> Collectors.toList())), then all the values on a remote node are collected into a single list and marshalled into a single byte array/JGroups message.

      The creation of the byte array is likely to fail with an OutOfMemoryError, but if the total size is > 2GB and there is enough free heap memory, an overflow bug in BytesObjectOutput.ensureCapacity() turns the OOME into an ArrayIndexOutOfBoundsException.

            Unassigned Unassigned
            dberinde@redhat.com Dan Berindei (Inactive)
            0 Vote for this issue
            3 Start watching this issue