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

Junhao Li commented on SOLR-7667:
---------------------------------

[[email protected]] Thanks for your help to set this up.

I think it is a classical producer/consumer scenario,  a right place for the 
BlockingQueue. But it involves several code modification and the modifylock 
hold us back. 

I am only also thinking whether we can expand the modifylock scope to include 
the actual core close operation, like it. But it didn't work.

  @Override
  public void run() {
    while (! container.isShutDown()) {
      synchronized (solrCores.getModifyLock()) { // need this so we can wait 
and be awoken.
        try {
          solrCores.getModifyLock().wait();
        } catch (InterruptedException e) {
          // Well, if we've been told to stop, we will. Otherwise, continue on 
and check to see if there are
          // any cores to close.
        }
      }
      for (SolrCore removeMe = solrCores.getCoreToClose();
           removeMe != null && !container.isShutDown();
           removeMe = solrCores.getCoreToClose()) {
        try {
          removeMe.close();
        } finally {
          solrCores.removeFromPendingOps(removeMe.getName());
        }
      }
    }
  }


Since Solr is new to me, it is a chance for me to look into the CoreContainer 
code.  I will think of a unit test case to cover the situation as you suggested 
in the mail.

Thank you. And I would like to engaging the contribution to such a wonderful 
project.



> If more cores are loaded at startup than the transient core size, cores 
> become unavailable.
> -------------------------------------------------------------------------------------------
>
>                 Key: SOLR-7667
>                 URL: https://issues.apache.org/jira/browse/SOLR-7667
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 5.2.1, Trunk
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>
> Edwin Lee from the user's list caught this, the original post is titled 
> "loadOnStartup & transientCoreSize & BUG Report on CoreContainer.java"
> Nice catch Edwin!
> More details to follow:



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to