[infinispan-issues] [JBoss JIRA] (ISPN-6335) Dist Stream iterator can return with no results in some cases

William Burns (JIRA) issues at jboss.org
Mon Mar 7 17:11:00 EST 2016


William Burns created ISPN-6335:
-----------------------------------

             Summary: Dist Stream iterator can return with no results in some cases
                 Key: ISPN-6335
                 URL: https://issues.jboss.org/browse/ISPN-6335
             Project: Infinispan
          Issue Type: Bug
          Components: Distributed Execution and Map/Reduce
    Affects Versions: 8.1.2.Final
            Reporter: William Burns
            Assignee: William Burns


The distributed iterator will process entries locally if it owns all of the segments (backup or primary).  If all of the entries are able to be stored in a single batch size (distributedBatchSize) then it is possible for the iterator to be closed before it can return a value.

The issue is that the results are passed to the queue and then the iterator is closed.  Unfortunately there is a very small gap in IteratorSupplier of DistributedCacheStream where it polls the queue and then checks completed flag (set by closing iterator).  If the results are put into the queue and the primary thread was suspended after checking the queue but then wakes up and sees the completion it will return no results.  This is reproducible with the new ReplicatedStreamRehashTest but doesn't require rehashs to occur.

The following are the 2 places affected.

https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/stream/impl/DistributedCacheStream.java#L733
&
https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/stream/impl/DistributedCacheStream.java#L742




--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list