lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (SOLR-11616) Backup failing on a constantly changing index with NoSuchFileException
Date Wed, 16 May 2018 16:53:00 GMT


David Smiley commented on SOLR-11616:

Looking at the code for SnapShooter.getIndexCommit, I see we are getting the refcounted searcher
but forgetting to decref it.  This looks like a bug and if it isn't then definitely deserves
a comment:


As an aside, this incref, decref business is error-prone.  I propose the following new method
on SolrCore:
   * Executes the lambda with the {@link SolrIndexSearcher}.  This is more convenient than
   * {@link #getSearcher()} since there is no ref-counting business to worry about.
   * Example:
   * <pre class="prettyprint">
   *   IndexReader reader = h.getCore().withSearcher(SolrIndexSearcher::getIndexReader);
   * </pre>
  public <R> R withSearcher(Function<SolrIndexSearcher,R> lambda) {
    final RefCounted<SolrIndexSearcher> refCounted = getSearcher();
    try {
      return lambda.apply(refCounted.get());
    } finally {

> Backup failing on a constantly changing index with NoSuchFileException
> ----------------------------------------------------------------------
>                 Key: SOLR-11616
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>            Assignee: Varun Thacker
>            Priority: Major
>             Fix For: 7.2, master (8.0)
>         Attachments: SOLR-11616.patch, SOLR-11616.patch, solr-6.3.log, solr-7.1.log
> As reported by several users on SOLR-9120 , Solr backups fail with NoSuchFileException
on a constantly changing index. 
> Users linked SOLR-9120 to the root cause as the stack trace is the same , but the fix
proposed there won't fix backups to stop failing.
> We need to implement a similar fix in {{SnapShooter#createSnapshot}} to fix the problem

This message was sent by Atlassian JIRA

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

View raw message