lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Biestro (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (SOLR-647) Do SolrCore.close() in a refcounted way
Date Wed, 06 Aug 2008 17:14:44 GMT

    [ https://issues.apache.org/jira/browse/SOLR-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620276#action_12620276
] 

henrib edited comment on SOLR-647 at 8/6/08 10:13 AM:
-------------------------------------------------------------

Looking at both versions of the patch, it seems you did not upload the intended one..

      was (Author: henrib):
    
It seems there is still the possibility that between the multicore.getCore() & core.incrementRef(),
some other thread gets the core to close.
May be we can have:
{code}
public SolrCore incrementRef() {
   return (refCount.incrementAndGet() > 1)? this : null;
}
{code}
And in SolrCoreDispatcher do:
{code}
core = multicore.getCore(name);
if (core != null)
  core = core.incrementRef();
{code}

Oh, looking at both versions of the patch, it seems you did not upload the intended one..
  
> Do SolrCore.close() in a refcounted way
> ---------------------------------------
>
>                 Key: SOLR-647
>                 URL: https://issues.apache.org/jira/browse/SOLR-647
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>             Fix For: 1.3
>
>         Attachments: SOLR-647.patch, SOLR-647.patch
>
>
> The method _SolrCore.close()_ directly closes the core . It can cause Exceptions for
in-flight requests. The _close()_ method should just do a decrement on refcount and the actual
close must happen when the last request being processed by that core instance is completed

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message