Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Reading the gc generation can cause a segment to be loaded again and as we already have the gc info we need in the SegmentId, we might as well use it and possibly skip loading the entire segment if we only need this bit of info.
relevant trace:
java.lang.Thread.State: RUNNABLE at sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:741) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:727) at org.apache.jackrabbit.oak.segment.file.TarWriter.readEntry(TarWriter.java:216) at org.apache.jackrabbit.oak.segment.file.FileStore$15.call(FileStore.java:1320) at org.apache.jackrabbit.oak.segment.file.FileStore$15.call(FileStore.java:1292) at org.apache.jackrabbit.oak.cache.CacheLIRS$Segment.load(CacheLIRS.java:1013) at org.apache.jackrabbit.oak.cache.CacheLIRS$Segment.get(CacheLIRS.java:974) - locked <0x000000079cb9d8e8> (a java.util.concurrent.atomic.AtomicBoolean) at org.apache.jackrabbit.oak.cache.CacheLIRS.get(CacheLIRS.java:285) at org.apache.jackrabbit.oak.segment.SegmentCache.getSegment(SegmentCache.java:92) at org.apache.jackrabbit.oak.segment.file.FileStore.readSegment(FileStore.java:1292) at org.apache.jackrabbit.oak.segment.SegmentId.getSegment(SegmentId.java:123) - locked <0x000000057cc8b7e0> (a org.apache.jackrabbit.oak.segment.SegmentId) at org.apache.jackrabbit.oak.segment.RecordId.getSegment(RecordId.java:94) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.isOldGeneration(SegmentWriter.java:1199) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.deduplicateNode(SegmentWriter.java:1158) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.writeNode(SegmentWriter.java:1006) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.writeNodeUncached(SegmentWriter.java:1069) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.writeNode(SegmentWriter.java:1013) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.writeNode(SegmentWriter.java:987) at org.apache.jackrabbit.oak.segment.SegmentWriter$SegmentWriteOperation.access$700(SegmentWriter.java:379) at org.apache.jackrabbit.oak.segment.SegmentWriter$8.execute(SegmentWriter.java:337) at org.apache.jackrabbit.oak.segment.SegmentBufferWriter.execute(SegmentBufferWriter.java:176) at org.apache.jackrabbit.oak.segment.SegmentWriter.writeNode(SegmentWriter.java:334) at org.apache.jackrabbit.oak.segment.Compactor$CompactDiff.childNodeAdded(Compactor.java:254)