Skip to content

Conversation

@HoustonPutman
Copy link
Contributor

https://issues.apache.org/jira/browse/SOLR-18083

Issues with readOnly:

  • Currently parts of recovery issue a commit to the leader, which can't happen if the leader is in readOnly mode. Since readOnly replicas will have already committed, we can introduce an option for commit to be a NO-OP if the core is in read-only mode.
  • If we are in read-only mode, we do not need to wait for documents to come in during various operations
  • IndexWriter cannot be opened in readOnly mode. The issue here is that certain operations open an IndexWriter for non-write reasons. Such as metrics, or opening a SolrSearcher with an IndexWriter to tell it what to read.

One other issue during indexFetching a readOnly core is that if we want to delete all documents during a fetch, then we want to be able to open an indexWriter to clear the index. While this goes against the spirit of a readOnly core, we are replicating from the leader and want to be in-sync. So we should allow writing in this case.

So instead of just disallowing opening IndexWriters at all, we should allow opening an indexWriter with a flag that says it will be used in accordance with the spirit of read-only rules.

These waits are letting updates get processed, which is not an issue for
read only collections/cores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant