[infinispan-issues] [JBoss JIRA] (ISPN-7548) SimpleCacheImpl streams iterate through the data container twice

Dan Berindei (JIRA) issues at jboss.org
Thu Mar 2 03:22:00 EST 2017


    [ https://issues.jboss.org/browse/ISPN-7548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13371318#comment-13371318 ] 

Dan Berindei commented on ISPN-7548:
------------------------------------

{{SimpleCacheImpl.clear()}} also uses {{DataContainer.size()}} when it should be using {{sizeIncludingExpired()}}.

> SimpleCacheImpl streams iterate through the data container twice
> ----------------------------------------------------------------
>
>                 Key: ISPN-7548
>                 URL: https://issues.jboss.org/browse/ISPN-7548
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 9.0.0.CR2
>            Reporter: Dan Berindei
>            Assignee: Dan Berindei
>             Fix For: 9.0.0.Final
>
>
> {{SimpleCacheImpl.getStreamSupplier()}} uses {{DataContainer.size()}} to estimate the size of the stream, and that method iterates through the data container in order to exclude expired entries. It should use {{DataContainer.sizeIncludingExpired()}} instead, which doesn't iterate through the data container.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list