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

Solr loads UNLOADed core on request

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.6
    • Fix Version/s: 6.6.1, 6.7, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None
    1. SOLR-10857.patch
      6 kB
      Erick Erickson
    2. SOLR-10857.patch
      4 kB
      Mikhail Khludnev

      Issue Links

        Activity

        Hide
        mkhludnev Mikhail Khludnev added a comment -

        SOLR-10857.patch reproducer.
        I traced it to CoreContainer.create(CoreDescriptor, boolean, boolean)

        Have no idea why it happens

        Show
        mkhludnev Mikhail Khludnev added a comment - SOLR-10857.patch reproducer. I traced it to CoreContainer.create(CoreDescriptor, boolean, boolean) Have no idea why it happens
        Hide
        erickerickson Erick Erickson added a comment -

        I've been in that code recently to clean up how we kept core containers in CoreDescriptors, copies of the CoreDescriptor in several places and the like. So it hasn't faded from my memory and quite possibly something I introduced.

        Digging, likely the CoreDescriptor isn't purged from the internal lists so it's loaded on demand.

        Show
        erickerickson Erick Erickson added a comment - I've been in that code recently to clean up how we kept core containers in CoreDescriptors, copies of the CoreDescriptor in several places and the like. So it hasn't faded from my memory and quite possibly something I introduced. Digging, likely the CoreDescriptor isn't purged from the internal lists so it's loaded on demand.
        Hide
        erickerickson Erick Erickson added a comment -

        Final patch, committing momentarily. Will commit to 6.6 branch for re-spin if we do that.

        This affected all core unloading, not just stand-alone.

        If you look at the patch you'll notice a kind of scary bit where I took out the if test when I moved the removeCoreDescriptor, see below. This does just what the old code did since the core descriptor was removed anyway even when deleteInstanceDir==false in 6.0+ at least.

            if (deleteInstanceDir) { // we aren't going to reload this if we delete the instance dir.
              solrCores.removeCoreDescriptor(cd);
            }
        

        This was another consequence of having copies of the CoreDescriptor hanging around in several places.

        I thought about removing the CoreDescriptor from SolrCore in SOLR-10007 and making the internal lists of CoreDescriptors in SolrCores and the transient plugin be the one true source of CoreDescriptors, but decided against it at the time due to how intrusive that patch was already, leaving that discussion for another day/JIRA.

        Show
        erickerickson Erick Erickson added a comment - Final patch, committing momentarily. Will commit to 6.6 branch for re-spin if we do that. This affected all core unloading, not just stand-alone. If you look at the patch you'll notice a kind of scary bit where I took out the if test when I moved the removeCoreDescriptor, see below. This does just what the old code did since the core descriptor was removed anyway even when deleteInstanceDir==false in 6.0+ at least. if (deleteInstanceDir) { // we aren't going to reload this if we delete the instance dir. solrCores.removeCoreDescriptor(cd); } This was another consequence of having copies of the CoreDescriptor hanging around in several places. I thought about removing the CoreDescriptor from SolrCore in SOLR-10007 and making the internal lists of CoreDescriptors in SolrCores and the transient plugin be the one true source of CoreDescriptors, but decided against it at the time due to how intrusive that patch was already, leaving that discussion for another day/JIRA.
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        SOLR-10857: Solr loads UNLOADed core on request.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 95841d9ed406def6be62ab039dba8c4dd4b552a8 in lucene-solr's branch refs/heads/master from Erick [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=95841d9 ] SOLR-10857 : Solr loads UNLOADed core on request.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 3ecd679f5a7a65a7cbecdd40ed8e40128e8706b9 in lucene-solr's branch refs/heads/branch_6x from Erick
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3ecd679 ]

        SOLR-10857: Solr loads UNLOADed core on request.

        (cherry picked from commit 95841d9ed406def6be62ab039dba8c4dd4b552a8)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 3ecd679f5a7a65a7cbecdd40ed8e40128e8706b9 in lucene-solr's branch refs/heads/branch_6x from Erick [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3ecd679 ] SOLR-10857 : Solr loads UNLOADed core on request. (cherry picked from commit 95841d9ed406def6be62ab039dba8c4dd4b552a8)
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        SOLR-10857: Solr loads UNLOADed core on request.

        (cherry picked from commit 95841d9ed406def6be62ab039dba8c4dd4b552a8)

        (cherry picked from commit 3ecd679)

        Show
        jira-bot ASF subversion and git services added a comment - Commit bc470424464f399043c516dd250ba56ca2b78da7 in lucene-solr's branch refs/heads/branch_6_6 from Erick [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bc47042 ] SOLR-10857 : Solr loads UNLOADed core on request. (cherry picked from commit 95841d9ed406def6be62ab039dba8c4dd4b552a8) (cherry picked from commit 3ecd679)
        Hide
        erickerickson Erick Erickson added a comment -

        Mikhail: Many thanks for the test case, made things much easier. Final patch includes your test.

        Show
        erickerickson Erick Erickson added a comment - Mikhail: Many thanks for the test case, made things much easier. Final patch includes your test.
        Hide
        mkhludnev Mikhail Khludnev added a comment -

        Erick Erickson, the test still has printStackTrace() that's not ideal.

        Show
        mkhludnev Mikhail Khludnev added a comment - Erick Erickson , the test still has printStackTrace() that's not ideal.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 5a737a3aab969b120a84dbc7cd7ed351796576b3 in lucene-solr's branch refs/heads/master from Erick Erickson
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5a737a3 ]

        SOLR-10857: Solr loads UNLOADed core on request, cleaned up printStackTrace

        Show
        jira-bot ASF subversion and git services added a comment - Commit 5a737a3aab969b120a84dbc7cd7ed351796576b3 in lucene-solr's branch refs/heads/master from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5a737a3 ] SOLR-10857 : Solr loads UNLOADed core on request, cleaned up printStackTrace
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 40368ec6b01d2f1198cbe57f7374233d74631249 in lucene-solr's branch refs/heads/branch_6x from Erick Erickson
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=40368ec ]

        SOLR-10857: Solr loads UNLOADed core on request, cleaned up printStackTrace

        (cherry picked from commit 5a737a3aab969b120a84dbc7cd7ed351796576b3)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 40368ec6b01d2f1198cbe57f7374233d74631249 in lucene-solr's branch refs/heads/branch_6x from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=40368ec ] SOLR-10857 : Solr loads UNLOADed core on request, cleaned up printStackTrace (cherry picked from commit 5a737a3aab969b120a84dbc7cd7ed351796576b3)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 59af129548d50c07b3b9b9f879a7105b5dfcd3d8 in lucene-solr's branch refs/heads/branch_6_6 from Erick Erickson
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=59af129 ]

        SOLR-10857: Solr loads UNLOADed core on request, cleaned up printStackTrace

        (cherry picked from commit 5a737a3aab969b120a84dbc7cd7ed351796576b3)
        (cherry picked from commit 40368ec6b01d2f1198cbe57f7374233d74631249)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 59af129548d50c07b3b9b9f879a7105b5dfcd3d8 in lucene-solr's branch refs/heads/branch_6_6 from Erick Erickson [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=59af129 ] SOLR-10857 : Solr loads UNLOADed core on request, cleaned up printStackTrace (cherry picked from commit 5a737a3aab969b120a84dbc7cd7ed351796576b3) (cherry picked from commit 40368ec6b01d2f1198cbe57f7374233d74631249)

          People

          • Assignee:
            erickerickson Erick Erickson
            Reporter:
            mkhludnev Mikhail Khludnev
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development