jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1469) Data store garbage collection: ScanEventListener not working
Date Thu, 13 Mar 2008 14:50:25 GMT

    [ https://issues.apache.org/jira/browse/JCR-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578320#action_12578320

Thomas Mueller commented on JCR-1469:

Fixed in revision 636774.

This patch introduces two new methods: GarbageCollector.setPersistenceManagerScan and getPersistenceManagerScan.
Also, the ScanEventListener is called even when using the PersistenceManager scan, however
with a null Node. My first idea was to add a PseudoNode class, but passing null is probably
OK. In that case the client could count how many times the method was called. I remember there
is a way to get the number of nodes in a repository (jcr.repository.stats.nodes.count).

I agree the NodeId would be OK as well, however I think we should not change the API in a
minor release.

I hope this patch can be included in the next minor Jackrabbit release.

> Data store garbage collection: ScanEventListener not working
> ------------------------------------------------------------
>                 Key: JCR-1469
>                 URL: https://issues.apache.org/jira/browse/JCR-1469
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.1
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
> The ScanEventListener is currently only called when using the 'scan all nodes recursively'
strategy. It is not called when all persistence managers implement IterablePersistenceManager
(GarbageCollector.scanPersistenceManagers). The ScanEventListener should be called in every
case, otherwise it is not possible to see the progress of the garbage collection.
> However there is a problem: IterablePersistenceManager.getAllNodeIds() doesn't return
Node objects, and it would make little sense to create real node objects (the performance
advantage of scanPersistenceManagers would be lost).
> Therefore, I propose a workaround: the ScanEventListener is called using a 'PseudoNode'.
This is a class that implements Node but only has meaningful getUUID() and toString() methods.
This allows to create a meaningful progress bar (as the UUIDs are returned in order).

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

View raw message