You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/02 15:11:12 UTC
[jira] [Commented] (STORM-1756) Storm-kafka tests leak resources
due to retained references to KafkaServer
[ https://issues.apache.org/jira/browse/STORM-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266570#comment-15266570 ]
ASF GitHub Bot commented on STORM-1756:
---------------------------------------
GitHub user srdo opened a pull request:
https://github.com/apache/storm/pull/1387
STORM-1756: Explicitly null KafkaServer reference in KafkaTestBroker …
…to prevent out of memory on large test classes.
I'm not clear on whether JUnit keeps the reference for the lifetime of the module test, or whether they're released after all tests in a class have run. Either way, a test class with a KafkaTestBroker field and many tests would likely still run out of memory.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/srdo/storm STORM-1756
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1387.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1387
----
commit 0f760c20f2a5d1376d20f1dcb259bdb000cc1d35
Author: Stig Rohde Døssing <st...@gmail.com>
Date: 2016-05-02T13:07:07Z
STORM-1756: Explicitly null KafkaServer reference in KafkaTestBroker to prevent out of memory on large test classes
----
> Storm-kafka tests leak resources due to retained references to KafkaServer
> --------------------------------------------------------------------------
>
> Key: STORM-1756
> URL: https://issues.apache.org/jira/browse/STORM-1756
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-kafka
> Reporter: Stig Rohde Døssing
> Assignee: Stig Rohde Døssing
>
> Since JUnit keeps a reference to each test class until all tests for a module have run, the KafkaTestBroker fields are not eligible for garbage collection until all tests have run. KafkaTestBroker keeps a reference to KafkaServerStartable/KafkaServer, which allocates resources that are also not eligible for collection. This very quickly causes surefire to run out of memory if this class is used more than a few places.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)