You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ca...@incubator.apache.org> on 2006/10/10 22:22:32 UTC

[JIRA] Created: (CAY-685) OSQueryCache concurrency improvements

OSQueryCache concurrency improvements
-------------------------------------

         Key: CAY-685
         URL: http://issues.apache.org/cayenne/browse/CAY-685
     Project: Cayenne
        Type: Improvement

  Components: Cayenne Core Library  
    Versions: 3.0    
    Reporter: Andrus Adamchik
 Assigned to: Andrus Adamchik 
    Priority: Minor
     Fix For: 3.0


OSQueryCache.get(QueryMetadata) exists immiately on cache miss, returning null, instead of filling the cache per advice given here:

http://wiki.opensymphony.com/display/CACHE/API+Usage

This works, but results in poor concurrency - if multiple threads run the same query simultaneously, the query will be executed multiple times, with last returning thread overriding the cache, so cache entry expiration results in spike of activity on a loaded server... 

To fix this we may need to reengineer the query pipeline (pass a "result factory" object to the cache, so that the query can be executed inside the cache provider).



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/cayenne/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira