Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.9
-
None
Description
There was a crash for oak-run check which ended with a UncheckedExecutionException (caused under the hood by an SNFE):
Checking checkpoint 8c9bfd14-3e96-49c3-805f-c7cc8e85fc26 com.google.common.util.concurrent.UncheckedExecutionException: org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment c909911f-0456-4b1d-a44f-7e72f28e6214 not found at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199) at com.google.common.cache.LocalCache.get(LocalCache.java:3932) at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721) at org.apache.jackrabbit.oak.segment.SegmentCache.getSegment(SegmentCache.java:113) at org.apache.jackrabbit.oak.segment.file.ReadOnlyFileStore.readSegment(ReadOnlyFileStore.java:114) at org.apache.jackrabbit.oak.segment.SegmentId.getSegment(SegmentId.java:154) at org.apache.jackrabbit.oak.segment.Record.getSegment(Record.java:70) at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:161) at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:173) at org.apache.jackrabbit.oak.segment.SegmentNodeState.getChildNode(SegmentNodeState.java:423) at org.apache.jackrabbit.oak.segment.SegmentNodeStore.retrieve(SegmentNodeStore.java:289) at org.apache.jackrabbit.oak.segment.file.tooling.ConsistencyChecker.checkConsistency(ConsistencyChecker.java:216) at org.apache.jackrabbit.oak.segment.tool.Check.run(Check.java:243) at org.apache.jackrabbit.oak.run.CheckCommand.execute(CheckCommand.java:95) at org.apache.jackrabbit.oak.run.Main.main(Main.java:49) Caused by: org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment c909911f-0456-4b1d-a44f-7e72f28e6214 not found at org.apache.jackrabbit.oak.segment.file.AbstractFileStore.readSegmentUncached(AbstractFileStore.java:276) at org.apache.jackrabbit.oak.segment.file.ReadOnlyFileStore$1.call(ReadOnlyFileStore.java:117) at org.apache.jackrabbit.oak.segment.file.ReadOnlyFileStore$1.call(ReadOnlyFileStore.java:114) at org.apache.jackrabbit.oak.segment.SegmentCache.lambda$getSegment$0(SegmentCache.java:116) at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193) ... 14 more
Since this comes from the cache and is wrapped in a UncheckedExecutionException, the catch block in ConsistencyChecker introduced in OAK-7837, fails to deal with it, causing erroneous termination of the check.