Solr
  1. Solr
  2. SOLR-5200 Add REST support for reading and modifying Solr configuration
  3. SOLR-7226

Make /query/* jmx/* , requestDispatcher/*, <listener> <initParams> properties in solrconfig.xml editable

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      The list of properties are

      query/useFilterForSortedQuery
      query/queryResultWindowSize
      query/queryResultMaxDocsCached
      query/enableLazyFieldLoading
      query/boolTofilterOptimizer
      query/maxBooleanClauses"

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1669368 from Noble Paul in branch 'dev/trunk'
        [ https://svn.apache.org/r1669368 ]

        SOLR-7226: Make /query/* jmx/* , requestDispatcher/*, <listener> <initParams> properties in solrconfig.xml editable

        Show
        ASF subversion and git services added a comment - Commit 1669368 from Noble Paul in branch 'dev/trunk' [ https://svn.apache.org/r1669368 ] SOLR-7226 : Make /query/* jmx/* , requestDispatcher/*, <listener> <initParams> properties in solrconfig.xml editable
        Hide
        Hoss Man added a comment -

        This triggers an NPE when running TestSolrConfigHandlerCloud

        : 1 tests failed.
        : FAILED:  org.apache.solr.handler.TestSolrConfigHandlerCloud.test
        : 
        : Error Message:
        : 
        : 
        : Stack Trace:
        : java.lang.NullPointerException
        :       at __randomizedtesting.SeedInfo.seed([934A75E5C97BEDE7:1B1E4A3F6787801F]:0)
        :       at org.apache.solr.core.TestSolrConfigHandler.reqhandlertests(TestSolrConfigHandler.java:382)
        :       at org.apache.solr.handler.TestSolrConfigHandlerCloud.testReqHandlerAPIs(TestSolrConfigHandlerCloud.java:91)
        :       at org.apache.solr.handler.TestSolrConfigHandlerCloud.test(TestSolrConfigHandlerCloud.java:77)
        
        Show
        Hoss Man added a comment - This triggers an NPE when running TestSolrConfigHandlerCloud : 1 tests failed. : FAILED: org.apache.solr.handler.TestSolrConfigHandlerCloud.test : : Error Message: : : : Stack Trace: : java.lang.NullPointerException : at __randomizedtesting.SeedInfo.seed([934A75E5C97BEDE7:1B1E4A3F6787801F]:0) : at org.apache.solr.core.TestSolrConfigHandler.reqhandlertests(TestSolrConfigHandler.java:382) : at org.apache.solr.handler.TestSolrConfigHandlerCloud.testReqHandlerAPIs(TestSolrConfigHandlerCloud.java:91) : at org.apache.solr.handler.TestSolrConfigHandlerCloud.test(TestSolrConfigHandlerCloud.java:77)
        Hide
        ASF subversion and git services added a comment -

        Commit 1669491 from Noble Paul in branch 'dev/trunk'
        [ https://svn.apache.org/r1669491 ]

        SOLR-7226: adding an experimental warning and removing a check

        Show
        ASF subversion and git services added a comment - Commit 1669491 from Noble Paul in branch 'dev/trunk' [ https://svn.apache.org/r1669491 ] SOLR-7226 : adding an experimental warning and removing a check
        Hide
        Shai Erera added a comment -

        Before this commit, these lines were commented out:

        //    List l = (List) ConfigOverlay.getObjectByPath(map,false, Arrays.asList("config", "initParams"));
        //    assertNotNull("no object /config/initParams : "+ TestBlobHandler.getAsString(map) , l);
        //    assertEquals( 1, l.size());
        //    assertEquals( "val", ((Map)l.get(0)).get("key") );
        

        The commit only added these

            List l = (List) ConfigOverlay.getObjectByPath(map,false, Arrays.asList("config", "initParams"));
            assertEquals( 1, l.size());
            assertEquals( "val", ((Map)l.get(0)).get("key") );
        

        I added the assertNotNull, and it prints this:

        java.lang.AssertionError: no object /config/initParams : {
          "responseHeader":{
            "status":0,
            "QTime":0},
          "config":{
            "znodeVersion":0,
            "luceneMatchVersion":"org.apache.lucene.util.Version:6.0.0",
            "updateHandler":{
              "class":"solr.DirectUpdateHandler2",
              "autoCommmitMaxDocs":-1,
              "indexWriterCloseWaitsForMerges":true,
              "openSearcher":true,
              "commitIntervalLowerBound":-1,
              "commitWithinSoftCommit":true,
              "autoCommit":{
                "maxDocs":-1,
                "maxTime":-1,
                "commitIntervalLowerBound":-1},
              "autoSoftCommit":{
                "maxDocs":-1,
                "maxTime":-1}},
            "query":{
              "useFilterForSortedQuery":false,
              "queryResultWindowSize":1,
              "queryResultMaxDocsCached":2147483647,
              "enableLazyFieldLoading":false,
              "maxBooleanClauses":1024,
              "":{
                "size":"10000",
                "showItems":"-1",
                "initialSize":"10",
                "name":"fieldValueCache"}},
            "jmx":{
              "agentId":null,
              "serviceUrl":null,
              "rootName":null},
            "requestHandler":{
              "standard":{
                "name":"standard",
                "class":"solr.StandardRequestHandler"},
              "/admin/file":{
                "name":"/admin/file",
                "class":"solr.admin.ShowFileRequestHandler",
                "invariants":{"hidden":"bogus.txt"}},
              "/update":{
                "name":"/update",
                "class":"org.apache.solr.handler.UpdateRequestHandler",
                "defaults":{}},
              "/update/json":{
                "name":"/update/json",
                "class":"org.apache.solr.handler.UpdateRequestHandler",
                "defaults":{"update.contentType":"application/json"}},
              "/update/csv":{
                "name":"/update/csv",
                "class":"org.apache.solr.handler.UpdateRequestHandler",
                "defaults":{"update.contentType":"application/csv"}},
              "/update/json/docs":{
                "name":"/update/json/docs",
                "class":"org.apache.solr.handler.UpdateRequestHandler",
                "defaults":{
                  "update.contentType":"application/json",
                  "json.command":"false"}},
              "/config":{
                "name":"/config",
                "class":"org.apache.solr.handler.SolrConfigHandler",
                "defaults":{}},
              "/schema":{
                "name":"/schema",
                "class":"org.apache.solr.handler.SchemaHandler",
                "defaults":{}},
              "/replication":{
                "name":"/replication",
                "class":"org.apache.solr.handler.ReplicationHandler",
                "defaults":{}},
              "/get":{
                "name":"/get",
                "class":"org.apache.solr.handler.RealTimeGetHandler",
                "defaults":{
                  "omitHeader":"true",
                  "wt":"json",
                  "indent":"true"}},
              "/admin/luke":{
                "name":"/admin/luke",
                "class":"org.apache.solr.handler.admin.LukeRequestHandler",
                "defaults":{}},
              "/admin/system":{
                "name":"/admin/system",
                "class":"org.apache.solr.handler.admin.SystemInfoHandler",
                "defaults":{}},
              "/admin/mbeans":{
                "name":"/admin/mbeans",
                "class":"org.apache.solr.handler.admin.SolrInfoMBeanHandler",
                "defaults":{}},
              "/admin/plugins":{
                "name":"/admin/plugins",
                "class":"org.apache.solr.handler.admin.PluginInfoHandler",
                "defaults":{}},
              "/admin/threads":{
                "name":"/admin/threads",
                "class":"org.apache.solr.handler.admin.ThreadDumpHandler",
                "defaults":{}},
              "/admin/properties":{
                "name":"/admin/properties",
                "class":"org.apache.solr.handler.admin.PropertiesRequestHandler",
                "defaults":{}},
              "/admin/logging":{
                "name":"/admin/logging",
                "class":"org.apache.solr.handler.admin.LoggingHandler",
                "defaults":{}},
              "/admin/ping":{
                "name":"/admin/ping",
                "class":"org.apache.solr.handler.PingRequestHandler",
                "defaults":{},
                "invariants":{
                  "echoParams":"all",
                  "q":"solrpingquery"}},
              "/admin/segments":{
                "name":"/admin/segments",
                "class":"org.apache.solr.handler.admin.SegmentsInfoRequestHandler",
                "defaults":{}}},
            "directoryFactory":{
              "name":"DirectoryFactory",
              "class":"org.apache.solr.core.MockDirectoryFactory",
              "solr.hdfs.blockcache.enabled":true,
              "solr.hdfs.blockcache.blocksperbank":1024,
              "solr.hdfs.home":"",
              "solr.hdfs.confdir":"",
              "solr.hdfs.blockcache.global":"false"},
            "updateRequestProcessorChain":[
              {
                "name":"nodistrib",
                "":[
                  {"class":"solr.NoOpDistributingUpdateProcessorFactory"},
                  {"class":"solr.RunUpdateProcessorFactory"}]},
              {
                "name":"dedupe",
                "":[
                  {
                    "class":"org.apache.solr.update.processor.SignatureUpdateProcessorFactory",
                    "enabled":true,
                    "overwriteDupes":true,
                    "fields":"v_t,t_field",
                    "signatureClass":"org.apache.solr.update.processor.TextProfileSignature"},
                  {"class":"solr.RunUpdateProcessorFactory"}]},
              {
                "name":"stored_sig",
                "":[
                  {
                    "class":"org.apache.solr.update.processor.SignatureUpdateProcessorFactory",
                    "enabled":true,
                    "signatureField":"non_indexed_signature_sS",
                    "overwriteDupes":false,
                    "fields":"v_t,t_field",
                    "signatureClass":"org.apache.solr.update.processor.TextProfileSignature"},
                  {"class":"solr.RunUpdateProcessorFactory"}]},
              {
                "name":"distrib-dup-test-chain-explicit",
                "":[
                  {"class":"solr.RegexReplaceProcessorFactory"},
                  {"class":"solr.DistributedUpdateProcessorFactory"},
                  {"class":"solr.RegexReplaceProcessorFactory"},
                  {"class":"solr.RunUpdateProcessorFactory"}]},
              {
                "name":"distrib-dup-test-chain-implicit",
                "":[
                  {"class":"solr.RegexReplaceProcessorFactory"},
                  {"class":"solr.RegexReplaceProcessorFactory"},
                  {"class":"solr.RunUpdateProcessorFactory"}]}],
            "updateHandlerupdateLog":{"dir":""},
            "requestDispatcher":{
              "handleSelect":true,
              "httpCaching":{
                "never304":false,
                "etagSeed":"Solr",
                "lastModFrom":"opentime",
                "cacheControl":null},
              "requestParsers":{
                "multipartUploadLimitKB":2048,
                "formUploadLimitKB":2048,
                "addHttpRequestToContext":false}},
            "indexConfig":{
              "maxBufferedDocs":-1,
              "maxMergeDocs":-1,
              "maxIndexingThreads":2,
              "mergeFactor":-1,
              "ramBufferSizeMB":16.0,
              "writeLockTimeout":1000,
              "lockType":"single",
              "mergeScheduler":{"class":"org.apache.solr.util.RandomMergePolicy"}}}}
        

        I didn't dig further, indeed there's no initParams record under "config", just wanted to add that info to the issue.

        Show
        Shai Erera added a comment - Before this commit, these lines were commented out: // List l = (List) ConfigOverlay.getObjectByPath(map,false, Arrays.asList("config", "initParams")); // assertNotNull("no object /config/initParams : "+ TestBlobHandler.getAsString(map) , l); // assertEquals( 1, l.size()); // assertEquals( "val", ((Map)l.get(0)).get("key") ); The commit only added these List l = (List) ConfigOverlay.getObjectByPath(map,false, Arrays.asList("config", "initParams")); assertEquals( 1, l.size()); assertEquals( "val", ((Map)l.get(0)).get("key") ); I added the assertNotNull , and it prints this: java.lang.AssertionError: no object /config/initParams : { "responseHeader":{ "status":0, "QTime":0}, "config":{ "znodeVersion":0, "luceneMatchVersion":"org.apache.lucene.util.Version:6.0.0", "updateHandler":{ "class":"solr.DirectUpdateHandler2", "autoCommmitMaxDocs":-1, "indexWriterCloseWaitsForMerges":true, "openSearcher":true, "commitIntervalLowerBound":-1, "commitWithinSoftCommit":true, "autoCommit":{ "maxDocs":-1, "maxTime":-1, "commitIntervalLowerBound":-1}, "autoSoftCommit":{ "maxDocs":-1, "maxTime":-1}}, "query":{ "useFilterForSortedQuery":false, "queryResultWindowSize":1, "queryResultMaxDocsCached":2147483647, "enableLazyFieldLoading":false, "maxBooleanClauses":1024, "":{ "size":"10000", "showItems":"-1", "initialSize":"10", "name":"fieldValueCache"}}, "jmx":{ "agentId":null, "serviceUrl":null, "rootName":null}, "requestHandler":{ "standard":{ "name":"standard", "class":"solr.StandardRequestHandler"}, "/admin/file":{ "name":"/admin/file", "class":"solr.admin.ShowFileRequestHandler", "invariants":{"hidden":"bogus.txt"}}, "/update":{ "name":"/update", "class":"org.apache.solr.handler.UpdateRequestHandler", "defaults":{}}, "/update/json":{ "name":"/update/json", "class":"org.apache.solr.handler.UpdateRequestHandler", "defaults":{"update.contentType":"application/json"}}, "/update/csv":{ "name":"/update/csv", "class":"org.apache.solr.handler.UpdateRequestHandler", "defaults":{"update.contentType":"application/csv"}}, "/update/json/docs":{ "name":"/update/json/docs", "class":"org.apache.solr.handler.UpdateRequestHandler", "defaults":{ "update.contentType":"application/json", "json.command":"false"}}, "/config":{ "name":"/config", "class":"org.apache.solr.handler.SolrConfigHandler", "defaults":{}}, "/schema":{ "name":"/schema", "class":"org.apache.solr.handler.SchemaHandler", "defaults":{}}, "/replication":{ "name":"/replication", "class":"org.apache.solr.handler.ReplicationHandler", "defaults":{}}, "/get":{ "name":"/get", "class":"org.apache.solr.handler.RealTimeGetHandler", "defaults":{ "omitHeader":"true", "wt":"json", "indent":"true"}}, "/admin/luke":{ "name":"/admin/luke", "class":"org.apache.solr.handler.admin.LukeRequestHandler", "defaults":{}}, "/admin/system":{ "name":"/admin/system", "class":"org.apache.solr.handler.admin.SystemInfoHandler", "defaults":{}}, "/admin/mbeans":{ "name":"/admin/mbeans", "class":"org.apache.solr.handler.admin.SolrInfoMBeanHandler", "defaults":{}}, "/admin/plugins":{ "name":"/admin/plugins", "class":"org.apache.solr.handler.admin.PluginInfoHandler", "defaults":{}}, "/admin/threads":{ "name":"/admin/threads", "class":"org.apache.solr.handler.admin.ThreadDumpHandler", "defaults":{}}, "/admin/properties":{ "name":"/admin/properties", "class":"org.apache.solr.handler.admin.PropertiesRequestHandler", "defaults":{}}, "/admin/logging":{ "name":"/admin/logging", "class":"org.apache.solr.handler.admin.LoggingHandler", "defaults":{}}, "/admin/ping":{ "name":"/admin/ping", "class":"org.apache.solr.handler.PingRequestHandler", "defaults":{}, "invariants":{ "echoParams":"all", "q":"solrpingquery"}}, "/admin/segments":{ "name":"/admin/segments", "class":"org.apache.solr.handler.admin.SegmentsInfoRequestHandler", "defaults":{}}}, "directoryFactory":{ "name":"DirectoryFactory", "class":"org.apache.solr.core.MockDirectoryFactory", "solr.hdfs.blockcache.enabled":true, "solr.hdfs.blockcache.blocksperbank":1024, "solr.hdfs.home":"", "solr.hdfs.confdir":"", "solr.hdfs.blockcache.global":"false"}, "updateRequestProcessorChain":[ { "name":"nodistrib", "":[ {"class":"solr.NoOpDistributingUpdateProcessorFactory"}, {"class":"solr.RunUpdateProcessorFactory"}]}, { "name":"dedupe", "":[ { "class":"org.apache.solr.update.processor.SignatureUpdateProcessorFactory", "enabled":true, "overwriteDupes":true, "fields":"v_t,t_field", "signatureClass":"org.apache.solr.update.processor.TextProfileSignature"}, {"class":"solr.RunUpdateProcessorFactory"}]}, { "name":"stored_sig", "":[ { "class":"org.apache.solr.update.processor.SignatureUpdateProcessorFactory", "enabled":true, "signatureField":"non_indexed_signature_sS", "overwriteDupes":false, "fields":"v_t,t_field", "signatureClass":"org.apache.solr.update.processor.TextProfileSignature"}, {"class":"solr.RunUpdateProcessorFactory"}]}, { "name":"distrib-dup-test-chain-explicit", "":[ {"class":"solr.RegexReplaceProcessorFactory"}, {"class":"solr.DistributedUpdateProcessorFactory"}, {"class":"solr.RegexReplaceProcessorFactory"}, {"class":"solr.RunUpdateProcessorFactory"}]}, { "name":"distrib-dup-test-chain-implicit", "":[ {"class":"solr.RegexReplaceProcessorFactory"}, {"class":"solr.RegexReplaceProcessorFactory"}, {"class":"solr.RunUpdateProcessorFactory"}]}], "updateHandlerupdateLog":{"dir":""}, "requestDispatcher":{ "handleSelect":true, "httpCaching":{ "never304":false, "etagSeed":"Solr", "lastModFrom":"opentime", "cacheControl":null}, "requestParsers":{ "multipartUploadLimitKB":2048, "formUploadLimitKB":2048, "addHttpRequestToContext":false}}, "indexConfig":{ "maxBufferedDocs":-1, "maxMergeDocs":-1, "maxIndexingThreads":2, "mergeFactor":-1, "ramBufferSizeMB":16.0, "writeLockTimeout":1000, "lockType":"single", "mergeScheduler":{"class":"org.apache.solr.util.RandomMergePolicy"}}}} I didn't dig further, indeed there's no initParams record under "config", just wanted to add that info to the issue.
        Hide
        ASF subversion and git services added a comment -

        Commit 1669634 from Noble Paul in branch 'dev/trunk'
        [ https://svn.apache.org/r1669634 ]

        SOLR-7226: fixed the commented out testcase due to failure

        Show
        ASF subversion and git services added a comment - Commit 1669634 from Noble Paul in branch 'dev/trunk' [ https://svn.apache.org/r1669634 ] SOLR-7226 : fixed the commented out testcase due to failure
        Hide
        Noble Paul added a comment -

        Shai Erera yeah, I had to comment it out because it was failing. Now I have put it back.

        Show
        Noble Paul added a comment - Shai Erera yeah, I had to comment it out because it was failing. Now I have put it back.
        Hide
        ASF subversion and git services added a comment -

        Commit 1669637 from Noble Paul in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1669637 ]

        SOLR-7226: fixed the commented out testcase due to failure

        Show
        ASF subversion and git services added a comment - Commit 1669637 from Noble Paul in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1669637 ] SOLR-7226 : fixed the commented out testcase due to failure
        Hide
        Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        Timothy Potter added a comment - Bulk close after 5.1 release

          People

          • Assignee:
            Noble Paul
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development