Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9844

Improve FieldCache usage API response

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      We know the size of each entry in the fieldCache and display that on the admin UI screen under Plugin/Stats -> fieldCache currently.

      We also show the total entries count. Lets also show the total size of the cache .

      This is valuable information to tell users how much heap memory is being occupied by the fieldCache.

      1. Screen Shot 2016-12-11 at 6.00.36 PM.png
        332 kB
        Varun Thacker
      2. SOLR-9844_followup.patch
        4 kB
        Varun Thacker
      3. SOLR-9844.patch
        7 kB
        Varun Thacker
      4. SOLR-9844.patch
        7 kB
        Varun Thacker

        Activity

        Hide
        varunthacker Varun Thacker added a comment -

        Also its annoying that the current entries show up like this

        entry#0:              'org.apache.lucene.index.SegmentCoreReaders@​20836290'=>'cat',class org.apache.lucene.index.SortedDocValues,0.5=>org.apache.solr.uninverting.FieldCacheImpl$SortedDocValuesImpl#1504618891 (​size =~ 288 bytes)
        

        I propose to simplify it to

        entry#0 field='cat' segment=_0 size='~288 bytes' 
        

        So this will tell us the field , segment and size of the entry.

        Show
        varunthacker Varun Thacker added a comment - Also its annoying that the current entries show up like this entry#0: 'org.apache.lucene.index.SegmentCoreReaders@​20836290'=>'cat',class org.apache.lucene.index.SortedDocValues,0.5=>org.apache.solr.uninverting.FieldCacheImpl$SortedDocValuesImpl#1504618891 (​size =~ 288 bytes) I propose to simplify it to entry#0 field='cat' segment=_0 size='~288 bytes' So this will tell us the field , segment and size of the entry.
        Hide
        varunthacker Varun Thacker added a comment -

        Patch which addresses both the issues mentioned.

        Attaching a screenshot of how it will look after the patch is committed.

        The encoding issue reported on SOLR-9297 still exists.

        Show
        varunthacker Varun Thacker added a comment - Patch which addresses both the issues mentioned. Attaching a screenshot of how it will look after the patch is committed. The encoding issue reported on SOLR-9297 still exists.
        Hide
        varunthacker Varun Thacker added a comment -

        Final patch. Same as before with a minor formatting improvement and CHANGES entry.

        All tests pass. I'll commit this shortly.

        Show
        varunthacker Varun Thacker added a comment - Final patch. Same as before with a minor formatting improvement and CHANGES entry. All tests pass. I'll commit this shortly.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 39ba13046bc48beaa139923d5f9fbf7d6fc192b2 in lucene-solr's branch refs/heads/master from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=39ba130 ]

        SOLR-9844: Improve FieldCache usage api response formatting and show total size information

        Show
        jira-bot ASF subversion and git services added a comment - Commit 39ba13046bc48beaa139923d5f9fbf7d6fc192b2 in lucene-solr's branch refs/heads/master from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=39ba130 ] SOLR-9844 : Improve FieldCache usage api response formatting and show total size information
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 10ff47c6b1610f0f05e2ab777827dad9b1cdbe23 in lucene-solr's branch refs/heads/branch_6x from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=10ff47c ]

        SOLR-9844: Improve FieldCache usage api response formatting and show total size information

        Show
        jira-bot ASF subversion and git services added a comment - Commit 10ff47c6b1610f0f05e2ab777827dad9b1cdbe23 in lucene-solr's branch refs/heads/branch_6x from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=10ff47c ] SOLR-9844 : Improve FieldCache usage api response formatting and show total size information
        Hide
        varunthacker Varun Thacker added a comment -

        The total size should be calculated only when list entries is needed. This optimization was made in SOLR-9374 and we should respect that

        Show
        varunthacker Varun Thacker added a comment - The total size should be calculated only when list entries is needed. This optimization was made in SOLR-9374 and we should respect that
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 39ba13046bc48beaa139923d5f9fbf7d6fc192b2 in lucene-solr's branch refs/heads/feature/metrics from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=39ba130 ]

        SOLR-9844: Improve FieldCache usage api response formatting and show total size information

        Show
        jira-bot ASF subversion and git services added a comment - Commit 39ba13046bc48beaa139923d5f9fbf7d6fc192b2 in lucene-solr's branch refs/heads/feature/metrics from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=39ba130 ] SOLR-9844 : Improve FieldCache usage api response formatting and show total size information
        Hide
        varunthacker Varun Thacker added a comment -

        The total size will only be computed when the entires list is asked for

        Show
        varunthacker Varun Thacker added a comment - The total size will only be computed when the entires list is asked for
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 512374384a8984c56c91f47dcac4aaf0490eda54 in lucene-solr's branch refs/heads/master from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5123743 ]

        SOLR-9844: Display fc total size only when field entries asked for

        Show
        jira-bot ASF subversion and git services added a comment - Commit 512374384a8984c56c91f47dcac4aaf0490eda54 in lucene-solr's branch refs/heads/master from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5123743 ] SOLR-9844 : Display fc total size only when field entries asked for
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 26d79714953cd707d2d283e264eaa5461a6d25cf in lucene-solr's branch refs/heads/branch_6x from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=26d7971 ]

        SOLR-9844: Display fc total size only when field entries asked for

        Show
        jira-bot ASF subversion and git services added a comment - Commit 26d79714953cd707d2d283e264eaa5461a6d25cf in lucene-solr's branch refs/heads/branch_6x from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=26d7971 ] SOLR-9844 : Display fc total size only when field entries asked for

          People

          • Assignee:
            varunthacker Varun Thacker
            Reporter:
            varunthacker Varun Thacker
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development