cpoerschke commented on PR #2607:
URL: https://github.com/apache/solr/pull/2607#issuecomment-2260007256

   > At least the change in CoreContainer & SolrCore here are about as trivial 
as can be. The complexity is in SyntheticSolrCore.reload().
   
   It seems (from a quick exploration) that factoring out a `newSolrCore` 
method could allow `SyntheticSolrCore` to override that method and then the 
`reload` method would not need to be overridden.
   
   ```
            cd.loadExtraProperties(); // Reload the extra properties
            core =
   -            new SolrCore(
   +            newSolrCore(
   
   +  protected SolrCore newSolrCore(
   +      CoreContainer coreContainer,
   +      CoreDescriptor coreDescriptor,
   +      ConfigSet configSet,
   +      String dataDir,
   +      UpdateHandler updateHandler,
   +      IndexDeletionPolicyWrapper delPolicy,
   +      SolrCore prev,
   +      boolean reload) {
   +    return new SolrCore(
   +        coreContainer, coreDescriptor, configSet, dataDir, updateHandler, 
delPolicy, prev, reload);
   +  }
   
   +  @Override
   +  protected SolrCore newSolrCore(
   +      CoreContainer coreContainer,
   +      CoreDescriptor coreDescriptor,
   +      ConfigSet configSet,
   +      String dataDir,
   +      UpdateHandler updateHandler,
   +      IndexDeletionPolicyWrapper delPolicy,
   +      SolrCore prev,
   +      boolean reload) {
   +    return new SyntheticSolrCore(
   +        coreContainer, coreDescriptor, configSet, dataDir, updateHandler, 
delPolicy, prev, reload);
   +  }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to