[ 
https://issues.apache.org/jira/browse/OAK-11895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18028744#comment-18028744
 ] 

Julian Sedding commented on OAK-11895:
--------------------------------------

Because of the sensitive nature of compaction, I have copied the implementation 
without the fix for this issue into the class {{LegacyCheckpointCompactor}}. By 
default the fixed implementation in {{CheckpointCompactor}} is instantiated in 
{{org.apache.jackrabbit.oak.segment.file.AbstractCompactionStrategy}}. However, 
it is possible to switch back to the old implementation in 
{{LegacyCheckpointCompactor}} by setting the system property 
{{oak.compaction.legacy=true}}.

The system property and the class {{LegacyCheckpointCompactor}} should be 
removed when there is sufficient confidence that the fixed implementation 
introduces no regressions.

> CheckpointCompactor writes to "after" instead of "onto" NodeState
> -----------------------------------------------------------------
>
>                 Key: OAK-11895
>                 URL: https://issues.apache.org/jira/browse/OAK-11895
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>    Affects Versions: 1.84.0
>            Reporter: Julian Sedding
>            Assignee: Julian Sedding
>            Priority: Major
>
> The method {{CheckpointCompactor#compact(NodeState before, NodeState after, 
> NodeState onto, Canceller canceller)}} writes the compacted changes to the 
> "after" NodeState instead of the "onto" NodeState.
> Likely, this went unnoticed until now, because AFAICS all used invocations 
> within Oak pass the same NodeState for the "after" and "onto" NodeStates.
> I am trying to create a compacted copy of a segmentstore. In this scenario 
> the "after" NodeState is backed by a {{ReadOnlyFileStore}}, because it is 
> compacting the segmentstore of a running system. When testing this scenario, 
> I got an exception, because the write to the "after" NodeState were denied.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to