patsonluk commented on code in PR #2607: URL: https://github.com/apache/solr/pull/2607#discussion_r1699048655
########## solr/core/src/java/org/apache/solr/core/SyntheticSolrCore.java: ########## @@ -72,4 +88,43 @@ protected RestManager initRestManager() throws SolrException { // We do not expect RestManager ops on Coordinator Nodes return new RestManager(); } + + @Override + public SolrCore reload(ConfigSet coreConfig) throws IOException { + // only one reload at a time + synchronized (getUpdateHandler().getSolrCoreState().getReloadLock()) { + solrCoreState.increfSolrCoreState(); + boolean success = false; + SyntheticSolrCore newCore = null; + try { + CoreDescriptor newCoreDescriptor = new CoreDescriptor(getName(), getCoreDescriptor()); + newCoreDescriptor.loadExtraProperties(); // Reload the extra properties + + newCore = + new SyntheticSolrCore( + getCoreContainer(), + newCoreDescriptor, + coreConfig, + getDataDir(), + getUpdateHandler(), + getDeletionPolicy(), + this, + true); + + newCore.getSearcher(true, false, null, true); + success = true; + return newCore; + } finally { + // close the new core on any errors that have occurred. + if (!success && newCore != null && newCore.getOpenCount() > 0) { Review Comment: After taking the great suggestion from @cpoerschke , we no longer need to overwrite the whole reload method 😊 -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org