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

NPE trying to set autoscaling policy for existing collection

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.7, 8.0, 9.0
    • 7.7.2, 8.0, 9.0
    • AutoScaling
    • None

    Description

      Steps to reproduce:

      • create a collection without collection-specific policy, eg. test
      • define a collection-specific policy policy1:
        POST http://localhost:8983/solr/admin/autoscaling
        {
        "set-policy": 
          {
        	"policy1" :[
        		{"replica": "<2", "shard": "#EACH", "node": "#ANY"}
        	]
          }
        }
        
      • try to modify the collection to use this policy
        http://localhost:8983/solr/admin/collections?action=MODIFYCOLLECTION&collection=test&policy=policy1
        

        A NullPointerException is thrown due to the previous value of the "policy" property being absent:

        2019-02-14 18:48:17.007 ERROR (OverseerThreadFactory-9-thread-5-processing-n:192.168.0.69:8983_solr) [c:test   ] o.a.s.c.a.c.OverseerCollectionMessageHandler Collection: test operation: modifycollection failed:java.lang.NullPointerException
                at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.modifyCollection(OverseerCollectionMessageHandler.java:687)
                at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java:292)
                at org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:496)
                at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                at java.lang.Thread.run(Thread.java:748)
        

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ab Andrzej Bialecki
            ab Andrzej Bialecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment