You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org> on 2012/06/04 16:10:23 UTC

[jira] [Created] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Dragos Dascalita Haut created SLING-2501:
--------------------------------------------

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


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

        

[jira] [Commented] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288580#comment-13288580 ] 

Dragos Dascalita Haut commented on SLING-2501:
----------------------------------------------

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

        

[jira] [Comment Edited] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Comment Edited] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288581#comment-13288581 ] 

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

I've included the patch exposing DataStoreGarbageCollector. 

I wanted to also include some tests, but I wasn't sure if the GC behavior included in jackrabbit-core should be in the scope for the integrations tests in Sling. If they should be, then I can create another patch, adding a test that does multiple file uploads, runs the GC, and then checks the disk usage of the dataStore folder to see if it decreased in size. 
                
      was (Author: dragos.dascalita):
    I've included the patch exposing DataStoreGarbageCollector.
                  
> 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

        

[jira] [Commented] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289169#comment-13289169 ] 

Dragos Dascalita Haut commented on SLING-2501:
----------------------------------------------

Thank you very much for taking time to review and commit the patch. I'm going to work on unit testing and when done I'm going to attach the patch with it as well. 
                
> 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
>            Assignee: Felix Meschberger
>              Labels: patch
>             Fix For: JCR Jackrabbit Server 2.1.2
>
>         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

        

[jira] [Comment Edited] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288581#comment-13288581 ] 

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

I've included the patch exposing DataStoreGarbageCollector.
                
      was (Author: dragos.dascalita):
    The patch exposing DataStoreGarbageCollector.
                  
> 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

        

[jira] [Resolved] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-2501.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: JCR Jackrabbit Server 2.1.2

Thank you very much for the patch. I have applied it in Rev. 1346081 with two modifications:

  * The stop method throws an UnsupportedOperationException (which looks more appropriate to me)
  * The service registration method fully registers with all services such that unregistration properly works
                
> 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
>            Assignee: Felix Meschberger
>              Labels: patch
>             Fix For: JCR Jackrabbit Server 2.1.2
>
>         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

        

[jira] [Updated] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Dragos Dascalita Haut (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dragos Dascalita Haut updated SLING-2501:
-----------------------------------------

    Attachment: exposing_GC_from_SlingServerRepository_to_be_able_to_clean_JCR_DataStore.patch

The patch exposing DataStoreGarbageCollector.
                
> 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

        

[jira] [Commented] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288774#comment-13288774 ] 

Felix Meschberger commented on SLING-2501:
------------------------------------------

> I wanted to also include some tests, but I wasn't sure if the GC behavior included in jackrabbit-core
> should be in the scope for the integrations tests in Sling.

I agree, that Sling cannot check whether GC is really operating. But we could check whether the RepositoryManager service is registered and that the close method throws and that the createDataStoreGarbageCollector() method properly returns a DataStoreGarbageCollector.
                
> 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

        

[jira] [Assigned] (SLING-2501) Expose DataStore GarbageCollector to be able to clean deleted filed from the Repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-2501:
----------------------------------------

    Assignee: Felix Meschberger
    
> 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
>            Assignee: Felix Meschberger
>              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