[ 
https://issues.apache.org/jira/browse/JCR-3862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcel Reutegger updated JCR-3862:
----------------------------------
    Attachment: JCR-3862-mreutegg.patch

I was just about to start the release process, but we can include this one 
after a review of the patch.

I attached an updated patch with my suggestions.

In my patch, deleteEmptyParentDirs() is only called when the file was deleted. 
I also included a null check for the String array returned by File.list(). The 
null value indicates an I/O error occurred. I would also change the log levels 
slightly. An info message for each deleted directory seems to verbose to me and 
I would rather issue warn messages when something cannot be deleted. It may 
even be better to throw an exception in that case.

> [FileDataStore]: deleteRecord leaves the parent directories empty
> -----------------------------------------------------------------
>
>                 Key: JCR-3862
>                 URL: https://issues.apache.org/jira/browse/JCR-3862
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-data
>            Reporter: Amit Jain
>            Assignee: Amit Jain
>         Attachments: JCR-3862-mreutegg.patch, JCR-3862.patch
>
>
> Calling deleteRecord to delete a particular record does not delete any empty 
> parent directories empty. Oak uses this particular method for garbage 
> collection due to which after a while large number of empty directories keep 
> lying around, making the process increasingly slower.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to