Class LegacyCheckpointCompactor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.Compactor
-
- org.apache.jackrabbit.oak.segment.LegacyCheckpointCompactor
-
@Deprecated(since="1.88.0") public class LegacyCheckpointCompactor extends Compactor
Deprecated.UseCheckpointCompactorinstead.Note: this implementation is a copy of the code before the fix for OAK-11985. This implementation is left here in case of new issues introduced with OAK-11985. Inorg.apache.jackrabbit.oak.segment.file.AbstractCompactionStrategya system property based toggle ("oak.compaction.legacy", boolean, default value "false") is implemented to switch betweenCheckpointCompactorandLegacyCheckpointCompactor. This compactor implementation is aware of the checkpoints in the repository. It uses this information to further optimise the compaction result by- Rebasing the checkpoints and subsequently the root on top of each other in chronological order. This results minimises the deltas that need to be processed and stored.
- Caching the compacted checkpoints and root states for deduplication should the same checkpoint or root state occur again in a later compaction retry cycle.
- Since:
- 1.86.0 (OAK-11985)
- See Also:
CheckpointCompactor
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull ClassicCompactorcompactorDeprecated.protected @NotNull GCMonitorgcListenerDeprecated.
-
Constructor Summary
Constructors Constructor Description LegacyCheckpointCompactor(@NotNull GCMonitor gcListener, @NotNull ClassicCompactor compactor)Deprecated.Create a new instance based on the passed arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @Nullable CompactedNodeStatecompact(@NotNull NodeState before, @NotNull NodeState after, @NotNull NodeState onto, @NotNull Canceller canceller)Deprecated.compact the differences betweenafterandbeforeon top ofonto.@Nullable CompactedNodeStatecompactDown(@NotNull NodeState before, @NotNull NodeState after, @NotNull Canceller hardCanceller, @NotNull Canceller softCanceller)Deprecated.compact the differences betweenafterandbeforeon top ofafter.-
Methods inherited from class org.apache.jackrabbit.oak.segment.Compactor
compactDown, compactUp, compactUp
-
-
-
-
Field Detail
-
gcListener
@NotNull protected final @NotNull GCMonitor gcListener
Deprecated.
-
compactor
@NotNull protected final @NotNull ClassicCompactor compactor
Deprecated.
-
-
Constructor Detail
-
LegacyCheckpointCompactor
public LegacyCheckpointCompactor(@NotNull @NotNull GCMonitor gcListener, @NotNull @NotNull ClassicCompactor compactor)Deprecated.Create a new instance based on the passed arguments.- Parameters:
gcListener- listener receiving notifications about the garbage collection processcompactor- the delegate compactor to use for the actual compaction work
-
-
Method Detail
-
compactDown
@Nullable public @Nullable CompactedNodeState compactDown(@NotNull @NotNull NodeState before, @NotNull @NotNull NodeState after, @NotNull @NotNull Canceller hardCanceller, @NotNull @NotNull Canceller softCanceller) throws IOException
Deprecated.Description copied from class:Compactorcompact the differences betweenafterandbeforeon top ofafter.- Specified by:
compactDownin classCompactor- Parameters:
before- the node state to diff against fromafterafter- the node state diffed againstbeforehardCanceller- the trigger for hard cancellation, will abandon compaction if cancelledsoftCanceller- the trigger for soft cancellation, will return partially compacted state if cancelled- Returns:
- the compacted node state or
nullif hard-cancelled - Throws:
IOException- will throw exception if any errors occur during compaction
-
compact
@Nullable public @Nullable CompactedNodeState compact(@NotNull @NotNull NodeState before, @NotNull @NotNull NodeState after, @NotNull @NotNull NodeState onto, @NotNull @NotNull Canceller canceller) throws IOException
Deprecated.Description copied from class:Compactorcompact the differences betweenafterandbeforeon top ofonto.- Specified by:
compactin classCompactor- Parameters:
before- the node state to diff against fromafterafter- the node state diffed againstbeforeonto- the node state to compact to apply the diff tocanceller- the trigger for hard cancellation, will abandon compaction if cancelled- Returns:
- the compacted node state or
nullif hard-cancelled - Throws:
IOException- will throw exception if any errors occur during compaction
-
-