[
https://issues.apache.org/jira/browse/OAK-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chetan Mehrotra updated OAK-2045:
---------------------------------
Attachment: OAK-2045-segment-fault-approach-2-path-based.patch
Had discussion with [~mduerig] and [~alexparvulescu] and it was found that
CompactionMap based mapping approach would not work in all cases . For example
if node is modified few times before compaction is run then CompactionMap would
only have mapping for last state. So any NodeState reference to previous state
would not be mapped.
Given that a path based approach might be more stable to perform the mapping.
Attaching [a patch using path based
approach|^OAK-2045-segment-fault-approach-2-path-based.patch]. Its a WIP as not
all code paths are covered. For e.g. if a SegmentNodeState gets created via
MapRecord then it would not have path set.
> Long running JCR session prevent live cleanup in Segment FileStore
> ------------------------------------------------------------------
>
> Key: OAK-2045
> URL: https://issues.apache.org/jira/browse/OAK-2045
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segmentmk
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Fix For: 1.1
>
> Attachments: OAK-2045-segment-fault-approach-1.patch,
> OAK-2045-segment-fault-approach-2-path-based.patch,
> OAK-2045-segment-fault-approach.patch, OAK-2045-test-fix.patch
>
>
> Cleanup operation in SegmentNodeStore detects the un referenced garbage and
> clean it up. To determine the reference validity it starts with an initial
> set of SegmentId which have a live java reference.
> This works fine for simple setup but when Oak repository is used in an
> application (like Sling) where application code can create long running
> session (for observation) then such session are bound to old NodeState at
> time of startup. Such references prevent the cleanup logic to remove older
> revisions while system is running. Such revisions can only be removed via an
> offline compaction-> cleanup.
> Need to find out a way where we can _migrate_ such old NodeState references
> to newer revisions
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)