Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7817

LRUQueryCache.onQueryCache is always called with null as first parameter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0, 6.4.1, 6.5.1
    • Fix Version/s: 7.0, 6.6
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      According to the javadocs, LRUQueryCache.onQueryCache can be used to track usage statistics on cached queries. Unfortunately, due to a bug, the query parameter is always passed as null, making the method practically useless.

      This PR fixes the problem:
      https://github.com/apache/lucene-solr/pull/199

        Activity

        Hide
        jpountz Adrien Grand added a comment -

        Thanks for catching it! The change looks good, would you like to work on a test as well?

        Show
        jpountz Adrien Grand added a comment - Thanks for catching it! The change looks good, would you like to work on a test as well?
        Hide
        christophk Christoph Kaser added a comment -

        Thanks for the review! I added a test for nullness to TestLRUQueryCache.testFineGrainedStats and pushed it into the PR.

        Show
        christophk Christoph Kaser added a comment - Thanks for the review! I added a test for nullness to TestLRUQueryCache.testFineGrainedStats and pushed it into the PR.
        Hide
        christophk Christoph Kaser added a comment -

        Is there anything else missing I can add?
        If possible (and sensible), i would really like to get this into the next lucene version because it causes problems in our code which I solve by manually patching the LRUQueryCache.

        Show
        christophk Christoph Kaser added a comment - Is there anything else missing I can add? If possible (and sensible), i would really like to get this into the next lucene version because it causes problems in our code which I solve by manually patching the LRUQueryCache.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 506485c4403bce29cc06272f3341c6afc2f1d479 in lucene-solr's branch refs/heads/branch_6_6 from ChristophKaser
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=506485c ]

        LUCENE-7817: pass cached query to onQueryCache instead of null

        Closes #199

        Show
        jira-bot ASF subversion and git services added a comment - Commit 506485c4403bce29cc06272f3341c6afc2f1d479 in lucene-solr's branch refs/heads/branch_6_6 from ChristophKaser [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=506485c ] LUCENE-7817 : pass cached query to onQueryCache instead of null Closes #199
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 4465e265d90f701f61f9e2cc8eb303a4515c4764 in lucene-solr's branch refs/heads/branch_6x from ChristophKaser
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4465e26 ]

        LUCENE-7817: pass cached query to onQueryCache instead of null

        Closes #199

        Show
        jira-bot ASF subversion and git services added a comment - Commit 4465e265d90f701f61f9e2cc8eb303a4515c4764 in lucene-solr's branch refs/heads/branch_6x from ChristophKaser [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4465e26 ] LUCENE-7817 : pass cached query to onQueryCache instead of null Closes #199
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit fb56948e70f6468db27d7182add57d338104ba5e in lucene-solr's branch refs/heads/master from ChristophKaser
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fb56948 ]

        LUCENE-7817: pass cached query to onQueryCache instead of null

        Closes #199

        Show
        jira-bot ASF subversion and git services added a comment - Commit fb56948e70f6468db27d7182add57d338104ba5e in lucene-solr's branch refs/heads/master from ChristophKaser [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fb56948 ] LUCENE-7817 : pass cached query to onQueryCache instead of null Closes #199
        Hide
        jpountz Adrien Grand added a comment -

        Sorry, I have been busy with other things over the last few days. I just merged your patch, thank you! It should be included in the upcoming 6.6 release. We'll soon start the release process so it should be a matter of a week or two before it is available.

        Show
        jpountz Adrien Grand added a comment - Sorry, I have been busy with other things over the last few days. I just merged your patch, thank you! It should be included in the upcoming 6.6 release. We'll soon start the release process so it should be a matter of a week or two before it is available.
        Hide
        christophk Christoph Kaser added a comment -

        Perfect, thank you!

        Show
        christophk Christoph Kaser added a comment - Perfect, thank you!
        Show
        hossman Hoss Man added a comment - Note: adrien did followup commits fixing CHANGES.txt... http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/85167838 http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/fb865507 http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2dadd84f

          People

          • Assignee:
            Unassigned
            Reporter:
            christophk Christoph Kaser
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development