jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-82) Running MicroKernelIT test with the InMem persistence creates a lot of GC threads
Date Mon, 07 May 2012 10:23:51 GMT

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

Jukka Zitting commented on OAK-82:
----------------------------------

There was actually a rationale behind this apparently buggy behavior. :-)

My idea from OAK-31 was to have a default MicroKernelImpl constructor that creates an in-memory
kernel instance that doesn't use any extra resources like background threads:

{code:java}
/**
 * Creates a new in-memory kernel instance that doesn't need to be
 * explicitly closed, i.e. standard Java garbage collection will take
 * care of releasing any acquired resources when no longer needed.
 * Useful especially for test cases and other similar scenarios.
 */
public MicroKernelImpl() {
    this(new Repository());
}
{code}

The use case for this is that you can then freely create any number of such instances for
test purposes and simply let the standard Java garbage collector deal with them once no longer
used without worrying about proper resource cleanup.

I think that use case is still useful, so I adjusted the initialization code a bit in revision
1334949 so that the MK garbage collector doesn't get started when the above constructor is
used.
                
> Running MicroKernelIT test with the InMem persistence creates a lot of GC threads
> ---------------------------------------------------------------------------------
>
>                 Key: OAK-82
>                 URL: https://issues.apache.org/jira/browse/OAK-82
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>    Affects Versions: 0.1
>            Reporter: Dominique Pfister
>            Priority: Minor
>             Fix For: 0.2.1
>
>
> This is caused by MicroKernelImplFixture not disposing the MK instances it created

--
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

        

Mime
View raw message