Michael Dürig reopened OAK-6507:

Reopening as I think the proposed solution might cause (transient) {{SNFE}} 
exceptions under certain circumstances. 
Consider the case where a full compaction creates a new generation (3, 0, 
false) starting from a current generation (2, 1, false). The old reclaimer will 
consider the (former) current generation reclaimable even though it is still in 
the range of the number of retained generations (2). This case is reflected by 
the following test case ({{ReclaimersTest}}):

public void testRetainGenerationsAfterFullCompaction() {
    GCGeneration currentGeneration = newGCGeneration(2, 1, false);
    GCGeneration generationAfterFullCompaction = newGCGeneration(3, 0, false);

    Predicate<GCGeneration> reclaimer = 
newOldReclaimer(generationAfterFullCompaction, 2);

> Cleanup incorrectly removes base state created by full compaction
> -----------------------------------------------------------------
>                 Key: OAK-6507
>                 URL: https://issues.apache.org/jira/browse/OAK-6507
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>             Fix For: 1.8, 1.7.6
> The predicate used to mark segments for cleanup marks segments written by 
> full compactions. These segments are needed to reconstruct the full state of 
> the repository, together with the state built by tail compactions.

This message was sent by Atlassian JIRA

Reply via email to