Uploaded image for project: '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
    • Status: Closed
    • Priority: 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
        jpountz 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
        jpountz 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
        jira-bot 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
        jira-bot 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
        jira-bot 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
        jira-bot 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
        anshumg Anshum Gupta added a comment -

        Bulk close for 5.2.0.

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development