[jira] Issue Comment Edited: (SOLR-745) CoreAdminHandler in bad state after UNLOADing core

2008-09-01 Thread Henri Biestro (JIRA)

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

henrib edited comment on SOLR-745 at 9/1/08 3:02 AM:


Part of it might be in 'CoreContainer.getAdminHandler()' which should check 
that the (previous) admin core is not closed before attempting to (re)use it.
Adding a check for isClosed() seems necessary.
Something like:
{code}
  public SolrCore getAdminCore() {
synchronized (cores) {
  SolrCore core = adminCore != null ? adminCore.get() : null;
  if (core != null && !core.isClosed()) {
core.open();
  } else {

{code}

  was (Author: henrib):
Part of it might be in 'getAdminHandler()' which should check that the 
(previous) admin core is not closed before attempting to (re)use it.
Adding a check for isClosed() seems necessary.
Something like:
{code}
  public SolrCore getAdminCore() {
synchronized (cores) {
  SolrCore core = adminCore != null ? adminCore.get() : null;
  if (core != null && !core.isClosed()) {
core.open();
  } else {

{code}
  
> CoreAdminHandler in bad state after UNLOADing core
> --
>
> Key: SOLR-745
> URL: https://issues.apache.org/jira/browse/SOLR-745
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Hoss Man
> Fix For: 1.3
>
>
> using 1.3-rc1...
> # Start up the multicore example...{noformat}
> cd example
> java -Dsolr.solr.home=multicore -jar start.jar
> {noformat}
> # Hit the status URL repeatedly: 
> http://localhost:8983/solr/admin/cores?action=STATUS
> # Note: no problems in the log
> # unload core0: 
> http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core0
> # shift-reload on the status URL: 
> http://localhost:8983/solr/admin/cores?action=STATUS
> # Note the following exception each time...{noformat}
> SEVERE: java.util.concurrent.RejectedExecutionException
> at 
> java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)
> at 
> java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:384)
> at 
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:856)
> at 
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:45)
> at 
> java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:606)
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1062)
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:821)
> at 
> org.apache.solr.request.SolrQueryRequestBase.getSearcher(SolrQueryRequestBase.java:208)
> at 
> org.apache.solr.servlet.cache.HttpCacheHeaderUtil.calcLastModified(HttpCacheHeaderUtil.java:146)
> at 
> org.apache.solr.servlet.cache.HttpCacheHeaderUtil.doCacheHeaderValidation(HttpCacheHeaderUtil.java:220)
> at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:224)
> at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
> at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:285)
> at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
> at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
> at 
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
> at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> {noformat}
> # Note that the exception doesn't just happen the first time you reload the 
> status URL, but everytime.
> Marking "Fix in 1.3" until someone smarter then me about CoreAdminHandler 
> says it's no big deal.

-- 
This message is automatically generated by JIRA.
-
You c

[jira] Issue Comment Edited: (SOLR-745) CoreAdminHandler in bad state after UNLOADing core

2008-09-01 Thread Henri Biestro (JIRA)

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

henrib edited comment on SOLR-745 at 9/1/08 3:21 PM:


The uploaded patch fixes it (Linux/Ubuntu 8.04/Java 1.6)

  was (Author: henrib):
Seems like this fixes it.
  
> CoreAdminHandler in bad state after UNLOADing core
> --
>
> Key: SOLR-745
> URL: https://issues.apache.org/jira/browse/SOLR-745
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Hoss Man
> Fix For: 1.3
>
> Attachments: solr-745.patch
>
>
> using 1.3-rc1...
> # Start up the multicore example...{noformat}
> cd example
> java -Dsolr.solr.home=multicore -jar start.jar
> {noformat}
> # Hit the status URL repeatedly: 
> http://localhost:8983/solr/admin/cores?action=STATUS
> # Note: no problems in the log
> # unload core0: 
> http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core0
> # shift-reload on the status URL: 
> http://localhost:8983/solr/admin/cores?action=STATUS
> # Note the following exception each time...{noformat}
> SEVERE: java.util.concurrent.RejectedExecutionException
> at 
> java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)
> at 
> java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:384)
> at 
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:856)
> at 
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:45)
> at 
> java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:606)
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1062)
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:821)
> at 
> org.apache.solr.request.SolrQueryRequestBase.getSearcher(SolrQueryRequestBase.java:208)
> at 
> org.apache.solr.servlet.cache.HttpCacheHeaderUtil.calcLastModified(HttpCacheHeaderUtil.java:146)
> at 
> org.apache.solr.servlet.cache.HttpCacheHeaderUtil.doCacheHeaderValidation(HttpCacheHeaderUtil.java:220)
> at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:224)
> at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
> at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:285)
> at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
> at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
> at 
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
> at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> {noformat}
> # Note that the exception doesn't just happen the first time you reload the 
> status URL, but everytime.
> Marking "Fix in 1.3" until someone smarter then me about CoreAdminHandler 
> says it's no big deal.

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



[jira] Issue Comment Edited: (SOLR-745) CoreAdminHandler in bad state after UNLOADing core

2008-09-02 Thread Henri Biestro (JIRA)

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

henrib edited comment on SOLR-745 at 9/2/08 2:04 AM:


You are correct, refcounting on cores was introduced in SOLR-647. Before this, 
it was possible to close a core whilst it was serving requests.

The admin core is "any" core that is used so admin requests can be served 
(request handling assumes a core exists); it is kept around  through a weak 
reference to avoid looking for a new one each time an admin request is handled 
and is only maintained "opened" during execution of the request (like any other 
request wrt refcounting for that matter; incref - aka open - when we acquire 
the core, execute the query, decref - aka close - as release). 

The side effect is that the reference can point to a core that is closed but 
not yet GC-ed thus the bug & the fix.

As a side note, the java.util.concurrent.RejectedExecutionException is the 
typical symptom when trying to execute a query on a closed core.


  was (Author: henrib):
You are correct, refcounting on cores was introduced in SOLR-647. Before 
this, it was possible to close a core whilst it was serving requests.

The admin core is "any" core that is used so admin requests can be served 
(request handling assumes a core exists); it is kept around  through a weak 
reference to avoid looking for a new one each time an admin request is handled 
and is only maintained "opened" during execution of the request (like any other 
request wrt refcounting for that matter; incref -aka open- when we acquire the 
core, execute the query, decref -aka close- as release). 

The side effect is that the reference can point to a core that is closed but 
not yet GC-ed thus the bug & the fix.

As a side note, the java.util.concurrent.RejectedExecutionException is the 
typical symptom when trying to execute a query on a closed core.

  
> CoreAdminHandler in bad state after UNLOADing core
> --
>
> Key: SOLR-745
> URL: https://issues.apache.org/jira/browse/SOLR-745
> Project: Solr
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Hoss Man
> Fix For: 1.3
>
> Attachments: solr-745.patch
>
>
> using 1.3-rc1...
> # Start up the multicore example...{noformat}
> cd example
> java -Dsolr.solr.home=multicore -jar start.jar
> {noformat}
> # Hit the status URL repeatedly: 
> http://localhost:8983/solr/admin/cores?action=STATUS
> # Note: no problems in the log
> # unload core0: 
> http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core0
> # shift-reload on the status URL: 
> http://localhost:8983/solr/admin/cores?action=STATUS
> # Note the following exception each time...{noformat}
> SEVERE: java.util.concurrent.RejectedExecutionException
> at 
> java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)
> at 
> java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:384)
> at 
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:856)
> at 
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:45)
> at 
> java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:606)
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1062)
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:821)
> at 
> org.apache.solr.request.SolrQueryRequestBase.getSearcher(SolrQueryRequestBase.java:208)
> at 
> org.apache.solr.servlet.cache.HttpCacheHeaderUtil.calcLastModified(HttpCacheHeaderUtil.java:146)
> at 
> org.apache.solr.servlet.cache.HttpCacheHeaderUtil.doCacheHeaderValidation(HttpCacheHeaderUtil.java:220)
> at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:224)
> at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at 
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
> at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at org.mortbay.jetty.Server.handle(Server.java:285)
> at 
> org.