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

Dragos Dascalita Haut edited comment on SLING-2501 at 6/4/12 2:21 PM:
----------------------------------------------------------------------

Following the discussions on the mailing list, c.f.[1], I've been implemented a 
patch that exposes RepositoryManager through SlingServerRepository. 
SlingServerRepository implements RepositoryManager and is also registered as 
such.
- The createDataStoreGarbageCollector() method delegates to 
RepositoryImpl.createDataStoreGarbageCollector
- The close() method throws an exception  

In this way, it's easy to run the GC on the Data Store.. For instance, a 
servlet could declare:
@Reference
private RepositoryManager rm;

and then have:
DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
gc.mark();
gc.sweep();
gc.close()


[1] - 
http://mail-archives.apache.org/mod_mbox/sling-users/201206.mbox/%3CE9463579-DB3E-425D-8F3C-76569FD8BD99%40adobe.com%3E
                
      was (Author: dragos.dascalita):
    Following the discussions on the mailing list, c.f.[1], I've been 
implemented a patch that exposes RepositoryManager through 
SlingServerRepository. 
SlingServerRepository implements RepositoryManager and is also registered as 
such.
- The createDataStoreGarbageCollector() method delegates to 
RepositoryImpl.createDataStoreGarbageCollector
- The close() method throws an exception  

In this way, it's easy to run the GC on the Data Store.. For instance, a 
servlet could declare:
@Reference
private RepositoryManager rm;

and then have:
DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
gc.mark();
gc.sweep();


[1] - 
http://mail-archives.apache.org/mod_mbox/sling-users/201206.mbox/%3CE9463579-DB3E-425D-8F3C-76569FD8BD99%40adobe.com%3E
                  
> Expose DataStore GarbageCollector to be able to clean deleted filed from the 
> Repository
> ---------------------------------------------------------------------------------------
>
>                 Key: SLING-2501
>                 URL: https://issues.apache.org/jira/browse/SLING-2501
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Jackrabbit Server 2.1.0
>            Reporter: Dragos Dascalita Haut
>              Labels: patch
>         Attachments: 
> exposing_GC_from_SlingServerRepository_to_be_able_to_clean_JCR_DataStore.patch
>
>
> Currently Sling is not exposing any mean to be able to perform GC operations 
> on a JCR Repository. In this way, a repository managing larger docs, images, 
> and especially videos, may grow in size rapidly and there is no way to clean 
> the disk when files are deleted. 
> It would be nice to have the RepositoryManager exposed through 
> SlingServerRepository, and thus be able to create a Date Store Garbage 
> Collector and clean the repository. 

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

        

Reply via email to