Description
Currently the upgrade code tries to figure out if the source store uses an external datastore by running a SegmentTracker.collectBlobReferences process. This has performance problems when the given store doesn't use a datastore, so the above method will traverse the entire store without any callback (think 150GB store).
The relatively simple fix is to provide this flag via the command line for the upgrade bits, still using the existing method as a fallback if nothing is provided.
at org.apache.jackrabbit.oak.plugins.segment.Segment.<init>(Segment.java:224) at org.apache.jackrabbit.oak.plugins.segment.Segment.<init>(Segment.java:204) at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.readSegment(FileStore.java:1238) at org.apache.jackrabbit.oak.plugins.segment.SegmentTracker.readSegment(SegmentTracker.java:242) at org.apache.jackrabbit.oak.plugins.segment.SegmentId.getSegment(SegmentId.java:149) - locked <0x000000054e8e25c8> (a org.apache.jackrabbit.oak.plugins.segment.SegmentId) at org.apache.jackrabbit.oak.plugins.segment.SegmentTracker.collectBlobReferences(SegmentTracker.java:307) at org.apache.jackrabbit.oak.upgrade.cli.node.SegmentFactory.hasExternalBlobReferences(SegmentFactory.java:120) at org.apache.jackrabbit.oak.upgrade.cli.node.StoreFactory.hasExternalBlobReferences(StoreFactory.java:67) at org.apache.jackrabbit.oak.upgrade.cli.parser.StoreArguments.srcUsesEmbeddedDatastore(StoreArguments.java:109) at org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.migrate(OakUpgrade.java:64) at org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade.main(OakUpgrade.java:48)