Solr
  1. Solr
  2. SOLR-5279

Implicit properties don't seem to exist on core RELOAD

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5, 4.6, 6.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      The implicit properties (specifically solr.core.name) work fine for Solr startup, but on core RELOAD, they no longer exist, so configurations that use them result in the core not initializing.

      Problem discovered on 4.5.0 RC4, works fine in 4.4.0.

      1. SOLR-5279.patch
        2 kB
        Steve Rowe
      2. SOLR-5279-test.patch
        0.6 kB
        Shawn Heisey

        Activity

        Hide
        Shawn Heisey added a comment -

        Full stacktrace:

        ERROR - 2013-09-26 17:21:40.164; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Error handling 'reload' action
                at org.apache.solr.handler.admin.CoreAdminHandler.handleReloadAction(CoreAdminHandler.java:673)
                at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:172)
                at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
                at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:655)
                at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:246)
                at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                at org.eclipse.jetty.server.Server.handle(Server.java:365)
                at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
                at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
                at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
                at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
                at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
                at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                at java.lang.Thread.run(Thread.java:722)
        Caused by: org.apache.solr.common.SolrException: Unable to reload core: ncmain
                at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:936)
                at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:691)
                at org.apache.solr.handler.admin.CoreAdminHandler.handleReloadAction(CoreAdminHandler.java:671)
                ... 30 more
        Caused by: org.apache.solr.common.SolrException: No system property or default value specified for solr.core.name value:INFOSTREAM-${solr.core.name}.txt
                at org.apache.solr.util.PropertiesUtil.substituteProperty(PropertiesUtil.java:66)
                at org.apache.solr.util.DOMUtil.substituteProperties(DOMUtil.java:298)
                at org.apache.solr.util.DOMUtil.substituteProperties(DOMUtil.java:300)
                at org.apache.solr.util.DOMUtil.substituteProperties(DOMUtil.java:300)
                at org.apache.solr.core.Config.<init>(Config.java:141)
                at org.apache.solr.core.Config.<init>(Config.java:86)
                at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:129)
                at org.apache.solr.core.SolrCore.reload(SolrCore.java:403)
                at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:681)
                ... 31 more
        
        Show
        Shawn Heisey added a comment - Full stacktrace: ERROR - 2013-09-26 17:21:40.164; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Error handling 'reload' action at org.apache.solr.handler.admin.CoreAdminHandler.handleReloadAction(CoreAdminHandler.java:673) at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:172) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:655) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:246) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:365) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.solr.common.SolrException: Unable to reload core: ncmain at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:936) at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:691) at org.apache.solr.handler.admin.CoreAdminHandler.handleReloadAction(CoreAdminHandler.java:671) ... 30 more Caused by: org.apache.solr.common.SolrException: No system property or default value specified for solr.core.name value:INFOSTREAM-${solr.core.name}.txt at org.apache.solr.util.PropertiesUtil.substituteProperty(PropertiesUtil.java:66) at org.apache.solr.util.DOMUtil.substituteProperties(DOMUtil.java:298) at org.apache.solr.util.DOMUtil.substituteProperties(DOMUtil.java:300) at org.apache.solr.util.DOMUtil.substituteProperties(DOMUtil.java:300) at org.apache.solr.core.Config.<init>(Config.java:141) at org.apache.solr.core.Config.<init>(Config.java:86) at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:129) at org.apache.solr.core.SolrCore.reload(SolrCore.java:403) at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:681) ... 31 more
        Hide
        Shawn Heisey added a comment -

        Patch with test illustrating the problem. Chris Hostetter (Unused) came up with this.

        Show
        Shawn Heisey added a comment - Patch with test illustrating the problem. Chris Hostetter (Unused) came up with this.
        Hide
        Steve Rowe added a comment -

        The test in the patch fails for me on lucene_solr_4_5 (after I first apply Hoss's test expansion patch to this branch: http://svn.apache.org/r1525733). I'm digging.

        Show
        Steve Rowe added a comment - The test in the patch fails for me on lucene_solr_4_5 (after I first apply Hoss's test expansion patch to this branch: http://svn.apache.org/r1525733 ). I'm digging.
        Hide
        Steve Rowe added a comment -

        Patch, test passes under trunk and lucene_solr_4_5 branch; includes SOLR-5279-test.patch.

        The problem appears to be that when Alan Woodward fixed implicit core properties in CoreDescriptor.java under SOLR-5162, he forgot to include copying over the new substitutableProperties in the copy-constructor-with-new-core-name: CoreDescriptor(String,CoreDescriptor). I added this there, and that allowed the new test to pass.

        Committing shortly.

        Show
        Steve Rowe added a comment - Patch, test passes under trunk and lucene_solr_4_5 branch; includes SOLR-5279 -test.patch . The problem appears to be that when Alan Woodward fixed implicit core properties in CoreDescriptor.java under SOLR-5162 , he forgot to include copying over the new substitutableProperties in the copy-constructor-with-new-core-name: CoreDescriptor(String,CoreDescriptor) . I added this there, and that allowed the new test to pass. Committing shortly.
        Hide
        ASF subversion and git services added a comment -

        Commit 1527042 from Steve Rowe in branch 'dev/trunk'
        [ https://svn.apache.org/r1527042 ]

        SOLR-5279: Implicit properties don't seem to exist on core RELOAD

        Show
        ASF subversion and git services added a comment - Commit 1527042 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1527042 ] SOLR-5279 : Implicit properties don't seem to exist on core RELOAD
        Hide
        ASF subversion and git services added a comment -

        Commit 1527043 from Steve Rowe in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1527043 ]

        SOLR-5279: Implicit properties don't seem to exist on core RELOAD (merged trunk r1527042)

        Show
        ASF subversion and git services added a comment - Commit 1527043 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1527043 ] SOLR-5279 : Implicit properties don't seem to exist on core RELOAD (merged trunk r1527042)
        Hide
        ASF subversion and git services added a comment -

        Commit 1527076 from Steve Rowe in branch 'dev/trunk'
        [ https://svn.apache.org/r1527076 ]

        SOLR-5279: Move CHANGES.txt entry from 4.6 to 4.5

        Show
        ASF subversion and git services added a comment - Commit 1527076 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1527076 ] SOLR-5279 : Move CHANGES.txt entry from 4.6 to 4.5
        Hide
        ASF subversion and git services added a comment -

        Commit 1527077 from Steve Rowe in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1527077 ]

        SOLR-5279: Move CHANGES.txt entry from 4.6 to 4.5 (merged trunk r1527076)

        Show
        ASF subversion and git services added a comment - Commit 1527077 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1527077 ] SOLR-5279 : Move CHANGES.txt entry from 4.6 to 4.5 (merged trunk r1527076)
        Hide
        ASF subversion and git services added a comment -

        Commit 1527085 from Steve Rowe in branch 'dev/branches/lucene_solr_4_5'
        [ https://svn.apache.org/r1527085 ]

        SOLR-5279: Implicit properties don't seem to exist on core RELOAD (merged trunk r1527042 and r1527076)

        Show
        ASF subversion and git services added a comment - Commit 1527085 from Steve Rowe in branch 'dev/branches/lucene_solr_4_5' [ https://svn.apache.org/r1527085 ] SOLR-5279 : Implicit properties don't seem to exist on core RELOAD (merged trunk r1527042 and r1527076)
        Hide
        Steve Rowe added a comment -

        Committed to trunk, branch_4x and lucene_solr_4_5 branch.

        Thanks Shawn!

        Show
        Steve Rowe added a comment - Committed to trunk, branch_4x and lucene_solr_4_5 branch. Thanks Shawn!
        Hide
        Alan Woodward added a comment -

        Thanks for picking this up and fixing, Steve!

        Show
        Alan Woodward added a comment - Thanks for picking this up and fixing, Steve!
        Hide
        Adrien Grand added a comment -

        4.5 release -> bulk close

        Show
        Adrien Grand added a comment - 4.5 release -> bulk close

          People

          • Assignee:
            Unassigned
            Reporter:
            Shawn Heisey
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development