Julian Sedding created OAK-11964:
------------------------------------

             Summary: refactor parallel compaction inheritance
                 Key: OAK-11964
                 URL: https://issues.apache.org/jira/browse/OAK-11964
             Project: Jackrabbit Oak
          Issue Type: Task
          Components: segment-tar
    Affects Versions: 1.86.0
            Reporter: Julian Sedding
            Assignee: Julian Sedding


In preparation for OAK-11895, I would like to refactor the setup for parallel 
compaction. Currently the {{ParallelCompactor}} extends 
{{CheckpointCompactor}}, and {{CheckpointCompactor}} delegates to 
{{ClassicCompactor}}.

The fix for OAK-11895 affects {{CheckpointCompactor}}, however, as compaction 
is a sensitive area in the code, I want to keep the current implementation in 
{{LegacyCheckpointCompactor}} to allow toggling between the old implementation 
and the fixed implementation.

With {{ParallelCompactor}} extending from {{CheckpointCompactor}}, this would 
require copying {{ParallelCompactor}} as well.

However, if we refactor {{ParallelCompactor}} to extend from 
{{ClassicCompactor}} instead, then we can pass either a {{ClassicCompactor}} 
instance or a {{ParallelCompactor}} instance into the constructor of 
{{CheckpointCompactor}}, and later {{LegacyCheckpointCompactor}}), effectively 
configuring them to run either single-threaded or in parallel. This avoids the 
need for duplication of the {{ParallelCompactor}} class when addressing 
OAK-11895.





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

Reply via email to