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

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Tue Oct 10 2006 - 16:22:32 EDT

  • Next message: Tore Halset: "Re: Cocoa Cayenne status"

    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
    



    This archive was generated by hypermail 2.0.0 : Tue Oct 10 2006 - 16:23:21 EDT