Wim Symons created OAK-7951:
-------------------------------

             Summary: Datastore GC stats not updated with failure when "Not all 
repositories have marked references available"
                 Key: OAK-7951
                 URL: https://issues.apache.org/jira/browse/OAK-7951
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: blob-plugins
    Affects Versions: 1.6.14
            Reporter: Wim Symons


In case you have shared S3 datastore, and you haven't updated the repository-* 
files in the META/ folder after you add/remove some instances, you'll notice an 
error like this in the logs:

 
{code:java}
10.12.2018 04:01:23.535 *ERROR* [sling-oak-observation-51349] 
org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector Not all 
repositories have marked references available : 
[61b97331-58a8-434b-bb49-a43726b569bf]
{code}
Unfortunately, this error isn't reported back, so it appears DSGC has succeeded.

 

The logs state (for example):

 
{code:java}
10.12.2018 04:01:23.535 *INFO* [sling-oak-observation-51349] 
org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector Blob garbage 
collection completed in 20.25 s (20247 ms). Number of blobs deleted [0] with 
max modification time of [2018-12-09 04:01:03.288]
{code}
And the BlobGarbageCollection JMX bean reports success as well.

This is not wanted behaviour as the DSGC run has actually failed.

An IOException is thrown in 
[https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/MarkSweepGarbageCollector.java#L815,]
 but it is caught and not re-thrown at 
[https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/MarkSweepGarbageCollector.java#L462]

I think this exception should be re-thrown there causing it to be caught at 
[https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/MarkSweepGarbageCollector.java#L362]
 resulting in the correct behaviour.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to