[
https://issues.apache.org/jira/browse/OAK-2835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14531309#comment-14531309
]
Alex Parvulescu edited comment on OAK-2835 at 5/7/15 8:27 AM:
--------------------------------------------------------------
this works revolves mainly around clearing the in-memory refs to segmentids,
while doing this is a bit easier in a standby setup, I managed to find some
unexpected surprises here: the SegmentNodeStoreService's _SegmentNodeStore_ and
possibly _ObserverTracker_. As it turns out the delegate instance is registered
at activation and grabs a reference to the _root_ node state. unfortunately the
standby doesn't ever call into the SegmentNodeStore, so these references are
never refreshed (_changeDispatcher_ and _root_), thus keeping the entire graph
of references from the original root from being GC'ed.
[edit] clarified wording, removed patch ref, as this needs more work.
was (Author: alex.parvulescu):
[proposed patch|^OAK-2835.patch].
this works revolves mainly around clearing the in-memory refs to segmentids,
while doing this is a bit easier in a standby setup, I managed to find some
unexpected surprises here: the SegmentNodeStoreService's ObserverTracker. As it
turns out the ObserverTracker instance is registered at activation and grabs a
reference to the _root_ node state. unfortunately the standby doesn't ever call
into the SegmentNodeStore, so this reference is never refreshed, thus keeping
the entire graph of references from the original root from being GC'ed.
Patch will also add a part of OAK-2801: SegmentTracker#clearCache.
[~mduerig] please review!
> TARMK Cold Standby inefficient cleanup
> --------------------------------------
>
> Key: OAK-2835
> URL: https://issues.apache.org/jira/browse/OAK-2835
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segmentmk
> Reporter: Alex Parvulescu
> Assignee: Alex Parvulescu
> Priority: Critical
> Labels: compaction, gc, production, resilience
> Fix For: 1.3.0
>
> Attachments: OAK-2835.patch
>
>
> Following OAK-2817, it turns out that patching the data corruption issue
> revealed an inefficiency of the cleanup method. similar to the online
> compaction situation, the standby has issues clearing some of the in-memory
> references to old revisions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)