[
https://issues.apache.org/jira/browse/SOLR-6246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15573129#comment-15573129
]
ASF GitHub Bot commented on SOLR-6246:
--------------------------------------
GitHub user Peter-LaComb opened a pull request:
https://github.com/apache/lucene-solr/pull/96
SOLR-6246 - Fix core reload if suggester has been built.
In my testing, it is not required to keep the writer open for the suggester
to keep working.
Add and Update call ensureOpen, which will open a new writer if it has been
set = null.
This change closes it at the end of a build and sets the reference = null
such that
Add and Update will continue to work correctly. Additionally, commit is
updated to not
throw if the writer is null. This is correct because nothing has been added
or updated
since the last build.
The only thing I'm left with uncertainty about is reloading a core with NRT
updates
pending. This would appear to still cause the issue to appear again. The
difference being that
a rebuild would alleviate the issue. This requires additional thought.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Peter-LaComb/lucene-solr bugfix/SOLR-6246
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/96.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #96
----
commit c31db2f53b431ccb3263c824c7d5fde20aab5293
Author: Peter T. LaComb Jr <[email protected]>
Date: 2016-10-13T20:28:25Z
SOLR-6246 - Fix core reload if suggester has been built.
In my testing, it is not required to keep the writer open for the suggester
to keep working.
Add and Update call ensureOpen, which will open a new writer if it has been
set = null.
This change closes it at the end of a build and sets the reference = null
such that
Add and Update will continue to work correctly. Additionally, commit is
updated to not
throw if the writer is null. This is correct because nothing has been added
or updated
since the last build.
The only thing I'm left with uncertainty about is reloading a core with NRT
updates
pending. This would appear to still cause the issue to appear again. The
difference being that
a rebuild would alleviate the issue. This requires additional thought.
----
> Core fails to reload when AnalyzingInfixSuggester is used as a Suggester
> ------------------------------------------------------------------------
>
> Key: SOLR-6246
> URL: https://issues.apache.org/jira/browse/SOLR-6246
> Project: Solr
> Issue Type: Sub-task
> Components: SearchComponents - other
> Affects Versions: 4.8, 4.8.1, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4
> Reporter: Varun Thacker
> Attachments: SOLR-6246-test.patch, SOLR-6246-test.patch,
> SOLR-6246.patch
>
>
> LUCENE-5477 - added near-real-time suggest building to
> AnalyzingInfixSuggester. One of the changes that went in was a writer is
> persisted now to support real time updates via the add() and update() methods.
> When we call Solr's reload command, a new instance of AnalyzingInfixSuggester
> is created. When trying to create a new writer on the same Directory a lock
> cannot be obtained and Solr fails to reload the core.
> Also when AnalyzingInfixLookupFactory throws a RuntimeException we should
> pass along the original message.
> I am not sure what should be the approach to fix it. Should we have a
> reloadHook where we close the writer?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]