Lucene - Core
  1. Lucene - Core
  2. LUCENE-6483

Core closed listeners should be called with the same cache key as the one returned by getCoreCacheKey

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Core cache keys are typically used for caching, for instance we use them in the query cache and when uninverting.

      However, since FilterLeafReader delegates addCoreClosedListener by default, these listeners will always be called with the cache key of the wrapper reader. So if you happen to use a filter reader that overrides the core cache key, you are going to try to evict on a different key than the one that you used for caching.

      We should ensure that core closed listeners are always called on the same key as the one returned by #getCoreCacheKey

        Activity

        Hide
        Adrien Grand added a comment -

        Here is a patch: it changes FilterLeafReader to wrap the CoreClosedListener if necessary in order to call them on the right core cache key.

        Show
        Adrien Grand added a comment - Here is a patch: it changes FilterLeafReader to wrap the CoreClosedListener if necessary in order to call them on the right core cache key.
        Hide
        ASF subversion and git services added a comment -

        Commit 1680049 from Adrien Grand in branch 'dev/trunk'
        [ https://svn.apache.org/r1680049 ]

        LUCENE-6483: Ensure core closed listeners are called on the same cache key as the reader which has been used to register the listener.

        Show
        ASF subversion and git services added a comment - Commit 1680049 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1680049 ] LUCENE-6483 : Ensure core closed listeners are called on the same cache key as the reader which has been used to register the listener.
        Hide
        ASF subversion and git services added a comment -

        Commit 1680053 from Adrien Grand in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1680053 ]

        LUCENE-6483: Ensure core closed listeners are called on the same cache key as the reader which has been used to register the listener.

        Show
        ASF subversion and git services added a comment - Commit 1680053 from Adrien Grand in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1680053 ] LUCENE-6483 : Ensure core closed listeners are called on the same cache key as the reader which has been used to register the listener.
        Hide
        Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        Anshum Gupta added a comment - Bulk close for 5.2.0.

          People

          • Assignee:
            Adrien Grand
            Reporter:
            Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development