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

Enable loading of plugins from the corecontainer memclassloader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None

    Description

      When we update jars or add/modify plugins no core reloading should be required .Core reloading is a very expensive operation. Optionally, we can just make the plugin depend on the corecontainer level classloader.

       <queryParser name="mycustomQParser" class="my.path.to.ClassName" runtimeLib="global">
       
        </queryParser>
      

      or alternately using the config API

      curl -X POST -H 'Content-type:application/json' --data-binary '
      {
        "create-queryparser": {
            "name": "mycustomQParser" ,
            "class" : "my.path.to.ClassName",
           "runtimeLib" : "global"
        }
      }' http://localhost:8983/api/c/mycollection/config
      

      The global classloader is the corecontainer level classloader . So whenever this is reloaded The component gets reloaded. The only caveat is, this component cannot use core specific jars.

      We will deprecate the runtimeLib = true/false option and the new options are

      • runtimeLib=core : means this uses the runtimeLib of the collection
      • runtimeLib= global : means this uses the runtimeLib of the corecontainer

      example command to update global jar . This will lead to a reload of all components marked as runtimeLib=global

      curl -X POST -H 'Content-type:application/json' --data-binary '
      {
        "update-runtimelib": {
            "name": "lib-name" ,
            "url" : "http://host:port/url/of/jar",
            "sha512":"<the-new-sha512>"
        }
      }' http://localhost:8983/api/cluster
      

      Attachments

        1. BasicAuthFails.patch
          2 kB
          Noble Paul

        Issue Links

          Activity

            People

              Unassigned Unassigned
              noble.paul Noble Paul
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m