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

Michael Dürig commented on OAK-6507:
------------------------------------

Looking at the logic in {{Reclaimers.newOldReclaimer}} I tried to come up with 
a simpler approach (which involves changing the semantics of {{GCGeneration}}: 
basically a segments is reclaimable iff it is old and not in the same 
compaction tail as the segment of the current head state. A segment is old iff 
was created by a gc (full or tail) more than the number of retained generations 
in the past. A segment is in the same compaction tail as another one iff both 
share the same full generation. Encoding this definition and working it 
backwards results in the following fields we need to record in the segments: 
the gc generation (incremented on each gc run, full or tail). The full 
generation (incremented only on full gc runs) and an compaction flag indicating 
whether a segment has been written by a compaction operation (either full or 
tail). 

> 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
(v6.4.14#64029)

Reply via email to