Solr
  1. Solr
  2. SOLR-414

Coherent plugin initialization strategy

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      We currently load many plugins with a Map or NamedList – since SOLR-215, the current core is not available through SolrCore.getSolrCore() and may need to be used for initialization.

      Ideally, we could change the init() methods from:

      void init( final Map<String,String> args );

      to

      void init( final SolrCore core, final Map<String,String> args );

      Without breaking existing APIs, this change is difficult (some ugly options exist). This patch offers a solution to keep existing 1.2 APIs, and allow access to the SolrConfig and SolrCore though ThreadLocal. This should be removed in a future release.

      DeprecatedPluginUtils.getCurrentCore();
      DeprecatedPluginUtils.getCurrentConfig();

      This patch removes the SolrConfig.Initalizable that was introduced in SOLR-215.

      For background, see:
      http://www.nabble.com/Initializing---break-init%28%29-API-compatibility--tf4808463.html

      See also: SOLR-260, SOLR-215, SOLR-399

      1. SOLR-414-Initialization.patch
        86 kB
        Ryan McKinley
      2. SOLR-414-Initialization.patch
        63 kB
        Ryan McKinley
      3. SOLR-414-Initialization.patch
        64 kB
        Ryan McKinley
      4. SOLR-414-Initialization.patch
        52 kB
        Ryan McKinley
      5. SOLR-414-Initialization.patch
        52 kB
        Ryan McKinley

        Issue Links

          Activity

          Ryan McKinley created issue -
          Ryan McKinley made changes -
          Field Original Value New Value
          Attachment SOLR-414-Initialization.patch [ 12369752 ]
          Ryan McKinley made changes -
          Attachment SOLR-414-Initialization.patch [ 12369753 ]
          Ryan McKinley made changes -
          Link This issue is related to SOLR-399 [ SOLR-399 ]
          Ryan McKinley made changes -
          Link This issue incorporates SOLR-180 [ SOLR-180 ]
          Ryan McKinley made changes -
          Attachment SOLR-414-Initialization.patch [ 12369783 ]
          Ryan McKinley made changes -
          Attachment SOLR-414-Initialization.patch [ 12369930 ]
          Ryan McKinley made changes -
          Attachment SOLR-414-Initialization.patch [ 12370021 ]
          Ryan McKinley made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hoss Man made changes -
          Link This issue is related to SOLR-594 [ SOLR-594 ]
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ryan McKinley
              Reporter:
              Ryan McKinley
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development