[ 
https://issues.apache.org/jira/browse/OPENJPA-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894568#action_12894568
 ] 

Rick Curtis commented on OPENJPA-1727:
--------------------------------------

I'm guessing that the failure has to do with the fact that in 
QueryCacheStoreQuery.checkCache(...):147 we compare the timestamp of the query 
to the timestamp of each of the results, but when the timestamps are equal we 
will use the cached result. I changed the comparison so that if/when the 
timestamp of the query is the same as one of the results we will throw out the 
cached result. I'd rather error on the side of hitting the database than 
returning stale data.

I'm going to leave this JIRA open for a while to make sure that the test 
failure goes away.

> QueryCache TIMESTAMP eviction policy doesn't evict a timed out query if it 
> returns zero results.
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1727
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1727
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.1.0
>
>
> In QueryCacheStoreQuery.checkCache() if the query result has no result, we 
> return Collections.emptyList(). This is a problem when using the TIMESTAMP 
> eviction policy because we skip the section of code that looks at the 
> timestamp to evict stale entries.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to