You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Greg Bowyer (JIRA)" <ji...@apache.org> on 2012/04/28 03:38:48 UTC
[jira] [Created] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Greg Bowyer created SOLR-3423:
---------------------------------
Summary: HttpShardHandlerFactory does not shutdown its threadpool
Key: SOLR-3423
URL: https://issues.apache.org/jira/browse/SOLR-3423
Project: Solr
Issue Type: Bug
Affects Versions: 3.6, 4.0, 3.6.1
Reporter: Greg Bowyer
The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
(This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-3423:
---------------------------
Affects Version/s: (was: 3.6.1)
(was: 4.0)
Fix Version/s: 3.6.1
Assignee: Greg Bowyer
> HttpShardHandlerFactory does not shutdown its threadpool
> --------------------------------------------------------
>
> Key: SOLR-3423
> URL: https://issues.apache.org/jira/browse/SOLR-3423
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.6
> Reporter: Greg Bowyer
> Assignee: Greg Bowyer
> Labels: distributed, shard
> Fix For: 3.6.1
>
> Attachments: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff, SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
>
>
> The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
> (This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Posted by "Greg Bowyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283791#comment-13283791 ]
Greg Bowyer commented on SOLR-3423:
-----------------------------------
That sounds like a better approach, do you want me to make the changes ?
> HttpShardHandlerFactory does not shutdown its threadpool
> --------------------------------------------------------
>
> Key: SOLR-3423
> URL: https://issues.apache.org/jira/browse/SOLR-3423
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.6
> Reporter: Greg Bowyer
> Assignee: Greg Bowyer
> Labels: distributed, shard
> Fix For: 3.6.1
>
> Attachments: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff, SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
>
>
> The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
> (This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283782#comment-13283782 ]
Hoss Man commented on SOLR-3423:
--------------------------------
FWIW, since this confused me a bit...
* on trunk...
** ShardHandlerFactory has a close() method
** CoreContainer may create a ShardHandlerFactory, and closes it on shutdown
** SearchHandler may create a ShardHandlerFactory (if CoreContainer doesn't have one) and if so, then it registers a CloseHook to close it when the SearchHandler's SolrCore closes
** SOLR-3491 is another problem related to not closing ShardHandlerFactory instances in some cases, but that's unrelated to this issue.
* on 3x...
** ShardHandlerFactory doesn't define a close() method
** SearchHandler is the only thing instantiating ShardHandlerFactory
** SearchHandler doesn't do anything to clean up the resources of the ShardHandlerFactory.
(greg: did i miss anything?)
So with that in mind, it seems like:
* only 3.6 is affected by this issue (not trunk)
* i think there is still a thread pool leak in SearchHandlerwith your patch...
{code}
private ShardHandlerFactory shardHandlerFactory = new HttpShardHandlerFactory();
{code}
So my suggestion for 3x instead of your patch would be...
1) let "shardHandlerFactory" init to null, and assign it in SearchHandler.inform just like is done on trunk when CoreContainer doesn't have one (so SearchHandler never calls "new HttpShardHandler"
2) instead of making HttpShardHandlerFactory SolrCoreAware, lets just give SearchHandler a close method (like on trunk), and have SearchHandler register the CloseHook for it just like it does in trunk
Sound good?
> HttpShardHandlerFactory does not shutdown its threadpool
> --------------------------------------------------------
>
> Key: SOLR-3423
> URL: https://issues.apache.org/jira/browse/SOLR-3423
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.6
> Reporter: Greg Bowyer
> Labels: distributed, shard
> Fix For: 3.6.1
>
> Attachments: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff, SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
>
>
> The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
> (This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Posted by "Greg Bowyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Bowyer updated SOLR-3423:
------------------------------
Attachment: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
> HttpShardHandlerFactory does not shutdown its threadpool
> --------------------------------------------------------
>
> Key: SOLR-3423
> URL: https://issues.apache.org/jira/browse/SOLR-3423
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.6, 4.0, 3.6.1
> Reporter: Greg Bowyer
> Labels: distributed, shard
> Attachments: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff, SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
>
>
> The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
> (This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Posted by "Greg Bowyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Bowyer updated SOLR-3423:
------------------------------
Attachment: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
Patch that uses the CloseHook to attempt to shutdown the HttpShardHandlerFactory correctly.
This is untested but I think that it is probably going to work
> HttpShardHandlerFactory does not shutdown its threadpool
> --------------------------------------------------------
>
> Key: SOLR-3423
> URL: https://issues.apache.org/jira/browse/SOLR-3423
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.6, 4.0, 3.6.1
> Reporter: Greg Bowyer
> Labels: distributed, shard
> Attachments: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
>
>
> The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
> (This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-3423) HttpShardHandlerFactory does not
shutdown its threadpool
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-3423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283898#comment-13283898 ]
Hoss Man commented on SOLR-3423:
--------------------------------
Greg: go for it dude, you understand the shard factory stuff better then me
> HttpShardHandlerFactory does not shutdown its threadpool
> --------------------------------------------------------
>
> Key: SOLR-3423
> URL: https://issues.apache.org/jira/browse/SOLR-3423
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.6
> Reporter: Greg Bowyer
> Assignee: Greg Bowyer
> Labels: distributed, shard
> Fix For: 3.6.1
>
> Attachments: SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff, SOLR-3423-HttpShardHandlerFactory_ThreadPool_Shutdown_lucene_3x.diff
>
>
> The HttpShardHandlerFactory is not getting a chance to shutdown its threadpool, this means that in situations like a core reload / core swap its possible for the handler to leak threads
> (This may also be the case if the webapp is loaded / unloaded in the container)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org