jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-1639) MarkSweepGarbageCollector improvements
Date Sat, 29 Mar 2014 16:22:15 GMT

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

Chetan Mehrotra commented on OAK-1639:

bq. DocumentNodeStore#getReferencedBlobsIterator is passed into MarkSweepGarbageCollector#init)
in DocumentNodeStoreService. Won't this iterator be consumed after the first gc run such that
any further run won't do anything?

Fixed this with http://svn.apache.org/r1583017. Currently a single {{MarkSweepGarbageCollector}}
is created an used. However I am not sure if {{MarkSweepGarbageCollector}} is thread safe
as it has instance state. Probably better way would be to create a new instance for every

> MarkSweepGarbageCollector improvements
> --------------------------------------
>                 Key: OAK-1639
>                 URL: https://issues.apache.org/jira/browse/OAK-1639
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: core
>            Reporter: Michael Dürig
>            Assignee: Chetan Mehrotra
>             Fix For: 1.0
> While reviewing the patch for OAK-1582 I stumbled over a few issues with {{MarkSweepGarbageCollector}}
that need improving. First an foremost {{MarkSweepGarbageCollector}} needs better documentation.
The current javadoc as for many methods and arguments their semantics and invariants are unclear.

> Furthermore:
> * {{MarkSweepGarbageCollector#init()}}: why an init method, and not pass the respective
arguments directly to the constructor? Also at when are clients allowed to call init? Can
I call it while a a GC cycle is currently taking place? 
> * Is there (do we need) a protection for multiple GCs being initiated in parallel?
> * {{MarkSweepGarbageCollector.Sweeper#run}} and {{MarkSweepGarbageCollector.BlobIdRetriever#retrieve}}
catch {{Exception}} and {{e.printStackTrace()}}. This needs improving.
> * {{MarkSweepGarbageCollector#sweep}} catches {{InterruptedExceptionInterruptedException}}
 and {{e.printStackTrace()}. This is wrong as at least the threads interrupted status need
to be set.
> * {{DocumentNodeStore#getReferencedBlobsIterator}} is passed into {{MarkSweepGarbageCollector#init)}}
in {{DocumentNodeStoreService}}. Won't this iterator be consumed after the first gc run such
that any further run won't do anything?
> [~amitj_76], could you have a look at these points and create sub tasks as required?

This message was sent by Atlassian JIRA

View raw message