Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7951

Datastore GC stats not updated with failure when "Not all repositories have marked references available"

    XMLWordPrintableJSON

    Details

      Description

      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:

       

      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]
      

      Unfortunately, this error isn't reported back, so it appears DSGC has succeeded.

       

      The logs state (for example):

       

      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]
      

      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.

       

        Attachments

          Activity

            People

            • Assignee:
              amitjain Amit Jain
              Reporter:
              wim.symons Wim Symons
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: