[ 
https://issues.apache.org/jira/browse/SOLR-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Miller updated SOLR-4417:
------------------------------

    Attachment: SOLR-4417.patch

The first approach I test is pretty simple - after starting the new core in a 
reload, kick of an indexwriter reopen.

The test that will fail is AnalysisAfterCoreReloadTest.

if you change SolrCore around around line 749 from:

{code}
      // use the (old) writer to open the first searcher
      RefCounted<IndexWriter> iwRef = null;
      if (prev != null) {
        iwRef = prev.getUpdateHandler().getSolrCoreState().getIndexWriter(null);
        if (iwRef != null) {
          final IndexWriter iw = iwRef.get();
          newReaderCreator = new Callable<DirectoryReader>() {
            @Override
            public DirectoryReader call() throws Exception {
              return DirectoryReader.open(iw, true);
            }
          };
        }
      }
{code}
to 
{code}
      // use the (old) writer to open the first searcher
      if (prev != null) {
          newReaderCreator = new Callable<DirectoryReader>() {
            @Override
            public DirectoryReader call() throws Exception {
              return DirectoryReader.open(null, true);
          };
        }
      }
{code}

The test will pass, but TestReload#testGetRealtimeReload will fail.
                
> Look into reopening the IndexWriter on core reload.
> ---------------------------------------------------
>
>                 Key: SOLR-4417
>                 URL: https://issues.apache.org/jira/browse/SOLR-4417
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.1
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.2, 5.0
>
>         Attachments: SOLR-4417.patch
>
>
> This is largely for SOLR-3843, but other smaller reasons as well.
> I thought things had gotten to the point where this would be easy - but it's 
> not so easy because of our real time get support over core reloads it looks.
> That needs to use the old writer - it opens the first searcher after the 
> reload with the old writer - if we then reopen the writer we close that - and 
> a further reopen of the searcher ends up failing due to a closed writer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to