bruno-roustant commented on code in PR #2786:
URL: https://github.com/apache/solr/pull/2786#discussion_r1810654297


##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -2061,13 +2066,16 @@ public void reload(String name, UUID coreId) {
           RefCounted<IndexWriter> iwRef = 
core.getSolrCoreState().getIndexWriter(null);
           if (iwRef != null) {
             IndexWriter iw = iwRef.get();
-            // switch old core to readOnly
-            core.readOnly = true;

Review Comment:
   Hum, good point. I moved it because I didn't realize your point and 
UpdateHanlder.commit() checks the core is not readonly, otherwise stops with an 
exception.
   Actually, with your nice idea of an enum in CommitUpdateCommand, the intent 
would be clear and commit() would not reject if the core is closed after the 
commit. And we could restore the core.readonly = true at the right location 
here.



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