HoustonPutman commented on code in PR #4081:
URL: https://github.com/apache/solr/pull/4081#discussion_r2738756574


##########
solr/core/src/java/org/apache/solr/core/SolrCore.java:
##########
@@ -2476,7 +2476,7 @@ public RefCounted<SolrIndexSearcher> openNewSearcher(
                   true,
                   directoryFactory);
         } else {
-          RefCounted<IndexWriter> writer = 
getSolrCoreState().getIndexWriter(this);
+          RefCounted<IndexWriter> writer = 
getSolrCoreState().getIndexWriter(this, true);

Review Comment:
   So this isn't actually used for writing. When you create a Reader with a 
Writer, it just uses the writer so it can apply any given uncommitted deletes 
(as-per the Lucene documentation). So there's absolutely no reason for us to 
throw an exception here when we are in read-only mode.



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