0 Replies Latest reply on May 16, 2017 12:51 PM by David Duchaine

    Query DSL timeout on max() projection

    David Duchaine Newbie

      Version : infinispan-embedded-8.2.6.Final.jar

       

      I'm using a DSL-based query on a replicated, jdbc persisted cache with 100k entries.

       

      Values are single type POJO with several fields but only two are used in the query.

       

      ProductValuePojo {

           Long updateMillis;

           String productCode;

           ...

      }

       

      Persistence config:

      <persistence passivation="false">
      <jdbc:string-keyed-jdbc-store fetch-state="true" read-only="false" purge="false" preload="true" singleton="true">
           <config:property name="key2StringMapper">
           ....
           <jdbc:connection-pool .....
           <jdbc:string-keyed-table ....
      </jdbc:string-keyed-jdbc-store>
      
      
      </persistence>
      

       

      The query:

       

      QueryFactory<?> qf = org.infinispan.query.Search.getQueryFactory(cache);
      QueryBuilder<?> qBuilder = qf.from(ProductValuePojo.class).select(Expression.max("updateMillis")).having("productCode").eq(productCode).toBuilder();
      org.infinispan.query.dsl.Query query = qBuilder.build();
      
      List<Object> resultat = query.list();
      

       

      After approx. 10 seconds I get the following exception:

       

      Caused by: org.infinispan.util.concurrent.TimeoutException: Couldn't retrieve entry an entry from store in allotted timeout: 10 unit: SECONDS
        at org.infinispan.persistence.util.PersistenceManagerCloseableSupplier.get(PersistenceManagerCloseableSupplier.java:133)
        at org.infinispan.persistence.util.PersistenceManagerCloseableSupplier.get(PersistenceManagerCloseableSupplier.java:33)
        at org.infinispan.util.CloseableSuppliedIterator.getNext(CloseableSuppliedIterator.java:26)
        at org.infinispan.util.CloseableSuppliedIterator.hasNext(CloseableSuppliedIterator.java:32)
        at org.infinispan.util.DistinctKeyDoubleEntryCloseableIterator.hasNext(DistinctKeyDoubleEntryCloseableIterator.java:57)
        at java.util.Iterator.forEachRemaining(Iterator.java:115)
        at org.infinispan.stream.impl.spliterators.IteratorAsSpliterator.forEachRemaining(IteratorAsSpliterator.java:150)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:510)
        at org.infinispan.stream.impl.local.LocalCacheStream.collect(LocalCacheStream.java:220)
        at org.infinispan.stream.impl.AbstractDelegatingCacheStream.collect(AbstractDelegatingCacheStream.java:118)
        at org.infinispan.stream.impl.termop.object.NoMapIteratorOperation.actualPerformOperation(NoMapIteratorOperation.java:56)
        at org.infinispan.stream.impl.termop.object.NoMapIteratorOperation.performOperationRehashAware(NoMapIteratorOperation.java:72)
        at org.infinispan.stream.impl.DistributedCacheStream.performLocalRehashAwareOperation(DistributedCacheStream.java:603)
        at org.infinispan.stream.impl.DistributedCacheStream.lambda$rehashAwareIteration$17(DistributedCacheStream.java:567)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      

       

       

      Any idea why I'm getting this exception?

       

      thanks,

       

      David