dsmiley commented on code in PR #794:
URL: https://github.com/apache/solr/pull/794#discussion_r846385964


##########
solr/core/src/java/org/apache/solr/handler/IndexFetcher.java:
##########
@@ -1014,8 +1014,10 @@ private void openNewSearcherAndUpdateCommitPoint() 
throws IOException {
     // must get the latest solrCore object because the one we have might be 
closed because of a
     // reload
     // todo stop keeping solrCore around
-    SolrCore core = solrCore.getCoreContainer().getCore(solrCore.getName());
-    try {
+    try (SolrCore core = 
solrCore.getCoreContainer().getCore(solrCore.getName())) {
+      if (core == null) {
+        return; // core closed, presumably
+      }

Review Comment:
   Shrug; I'm not sure if it'd be good if we go from non-null to null.   
Instead, I could see using the current core as a fallback.  But I haven't 
worked with this code whatsoever and maybe you have. 



-- 
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

Reply via email to