[
https://issues.apache.org/jira/browse/SOLR-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082578#comment-13082578
]
Mark Miller commented on SOLR-2705:
-----------------------------------
Sure, likely easy enough to add.
The current test fails without the fix because the SolrCore is changed on the
reload, and replication will sometimes kick off the creation of a new index
writer. If it does this using the old SolrCore's settings/fields, as was
happening, it might not even be writing to the right index! And it's
DeletionPolicy will be the incorrect instance from the old core, and... When
the new writer is made, it needs it's info to come from the new SolrCore of
course. This bug was nasty - unfortunately we didn't have a test that could
tickle it.
So in this test, after the reload, if you add any further documents, they won't
show up in any searches, even after commit.
So the test adds 10 docs, ensures they are in the index, then adds 2 more docs,
and ensures 12 docs are in the index - without the fix it would find 10 rather
than 12 - until you restart the server.
> On reload, IndexWriterProvider holds onto the initial SolrCore it was created
> with
> ----------------------------------------------------------------------------------
>
> Key: SOLR-2705
> URL: https://issues.apache.org/jira/browse/SOLR-2705
> Project: Solr
> Issue Type: Bug
> Reporter: Mark Miller
> Assignee: Mark Miller
> Fix For: 4.0
>
> Attachments: SOLR-2705.patch
>
>
> dug up by Yury Kats in SOLR-2326
> The IWP needs to be updated to ref the new core on reload - else if some
> settings have changed (eg newIndexDir change caused by replication), the
> IndexWriter will be incorrectly reopened.
> This should really only be an issue when replication and core reloads are
> involved for the most part.
--
This message is automatically generated by JIRA.
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]