Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-685

OSQueryCache concurrency improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0M1, 3.0
    • Core Library
    • None

    Description

      OSQueryCache.get(QueryMetadata) exits immediately 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).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andrus Andrus Adamchik
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: