lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrzej Bialecki (JIRA)" <>
Subject [jira] [Commented] (SOLR-13271) Implement a read-only mode for a collection
Date Thu, 28 Feb 2019 17:04:00 GMT


Andrzej Bialecki  commented on SOLR-13271:

It turns out that actually closing the IndexWriter causes an avalanche of errors in many places,
starting with newSearcher, refcounting the directory, reusing the existing SolrCoreState on
reopen, etc, etc. Working around this issue would complicate the code a lot.

However, there's a boolean flag {{SolrCore.indexEnabled}} that prevents the opening of a new
IndexWriter, and it can also be used by DistributedURP to fail-fast ongoing long requests,
so this is what the latest patch uses. This flag is turned on by {{CoreContainer}} just after
the newly reloaded core has been constructed but before it's registered. The old core's {{indexEnabled}}
flag is also turned off (which will cause ongoing requests to fail) and its {{indexWriter.commit()}}
is called. IMHO this should be sufficient to address the concerns about the IW still being
open and the processing of old ongoing requests.

The latest patch also changes the readOnly flag to become a primary collection property. It
also reloads the collection both when the flag is turned on and when it's turned off - the
latter seems like the easiest way to switch the {{SolrCore.indexEnabled}} flag on all collection

> Implement a read-only mode for a collection
> -------------------------------------------
>                 Key: SOLR-13271
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 8.x, master (9.0)
>            Reporter: Andrzej Bialecki 
>            Assignee: Andrzej Bialecki 
>            Priority: Major
>             Fix For: 8.x, master (9.0)
>         Attachments: SOLR-13271.patch
> Spin-off from SOLR-11127. In some scenarios it's useful to be able to block any index
updates to a collection, while still being able to search its contents.
> Currently the scope of this issue is SolrCloud, ie. standalone Solr will not be supported.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message