dsmiley commented on code in PR #4081:
URL: https://github.com/apache/solr/pull/4081#discussion_r2739528075
##########
solr/core/src/java/org/apache/solr/update/SolrCoreState.java:
##########
@@ -178,7 +178,19 @@ public void deregisterInFlightUpdate() {
*
* @throws IOException If there is a low-level I/O error.
*/
- public abstract RefCounted<IndexWriter> getIndexWriter(SolrCore core) throws
IOException;
+ public RefCounted<IndexWriter> getIndexWriter(SolrCore core) throws
IOException {
+ return getIndexWriter(core, false);
+ }
+
+ /**
+ * Get the current IndexWriter. If a new IndexWriter must be created, use
the settings from the
+ * given {@link SolrCore}. Be very careful using the {@code
readOnlyCompatible} flag, by default
+ * it should be false if the returned indexWriter will be used for writing.
+ *
+ * @throws IOException If there is a low-level I/O error.
+ */
+ public abstract RefCounted<IndexWriter> getIndexWriter(SolrCore core,
boolean readOnlyCompatible)
Review Comment:
+1 to `failOnReadOnly` -- even better!
--
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]