[
https://issues.apache.org/jira/browse/OAK-6001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949049#comment-15949049
]
Michael Dürig edited comment on OAK-6001 at 3/30/17 2:45 PM:
-------------------------------------------------------------
The commit that reintroduced {{TarWriter#collectReferences}} is
[9bee082|https://github.com/apache/jackrabbit-oak/commit/9bee082]. This commit
is a fix by [~mduerig] for a previous commit of mine (OAK-4631,
[4d19c29|https://github.com/apache/jackrabbit-oak/commit/4d19c29]) which
dropped the pointers from a {{Segment}} to the referenced {{SegmentId}}
instances (see [the
change|https://github.com/apache/jackrabbit-oak/commit/4d19c29#diff-16bd79be555efa57ae1c5c50abb9b139L143]).
In the fix for OAK-4700, {{TarWriter#collectReferences}} is superfluous for
the same reasons described in this issue. I assume that
{{TarWriter#collectReferences}} is just a leftover from the experimentations
that brought to the resolution of OAK-4700.
was (Author: frm):
The commit that reintroduced {{TarWriter#collectReferences}} is 9bee082. This
commit is a fix by [~mduerig] for a previous commit of mine (OAK-4631, 4d19c29)
which dropped the pointers from a {{Segment}} to the referenced {{SegmentId}}
instances (see [the
change|https://github.com/apache/jackrabbit-oak/commit/4d19c29#diff-16bd79be555efa57ae1c5c50abb9b139L143]).
In the fix for OAK-4700, {{TarWriter#collectReferences}} is superfluous for
the same reasons described in this issue. I assume that
{{TarWriter#collectReferences}} is just a leftover from the experimentations
that brought to the resolution of OAK-4700.
> FileStore.GarbageCollector#collectBulkReferences performs unnecessary
> operations
> --------------------------------------------------------------------------------
>
> Key: OAK-6001
> URL: https://issues.apache.org/jira/browse/OAK-6001
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Francesco Mari
> Assignee: Francesco Mari
> Fix For: 1.8
>
>
> {{FileStore.GarbageCollector#collectBulkReferences}} looks into the currently
> active {{TarWriter}} for references. At the time this method is invoked, the
> currently active {{TarWriter}} is always empty.
> Slightly before inspecting the {{TarWriter}}, {{FileStore#newWriter}} is
> called to flush the content of the current {{TarWriter}} and to create a
> fresh one. For this reason, inspecting the {{TarWriter}} in
> {{FileStore.GarbageCollector#collectBulkReferences}} is unnecessary - the
> graph of the {{TarWriter}} is always empty. Those lines of code can be safely
> removed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)