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

Michael Dürig edited comment on OAK-6001 at 3/30/17 8:38 PM:
-------------------------------------------------------------

-But the call to {{TarWriter#collectReferences}} was necessary at the time I 
fixed OAK-4700 (https://github.com/apache/jackrabbit-oak/commit/9bee082). 
Commenting out just that call at that revision causes 
{{CompactionAndCleanupIT#concurrentCleanup}} to fail frequently. So my question 
is what changes to other parts in the code made {{TarWriter#collectReferences}} 
superfluous later on? I will probably have to {{git bisect}} this later 
today...-

Scrape that, I must have done something wrong when I came to above conclusion. 

In fact, it turns out that OAK-4700 fixed "too much". The changes done in the 
[{{SegmentBufferWriter}}|https://github.com/apache/jackrabbit-oak/commit/9bee082#diff-f81f861d45c9d9dad636e6fc59f373da]
 alone are sufficient to fix the problem. These changes ensure that the segment 
ids stay referenced by remembering theses directly instead of just the uuids. 
The change in {{FileStore}} where I added the call to 
{{TarWriter#collectReferences}} would not have been necessary. It is thus safe 
to remove this call and the method itself as initially intended!


was (Author: mduerig):
But the call to {{TarWriter#collectReferences}} was necessary at the time I 
fixed OAK-4700 (https://github.com/apache/jackrabbit-oak/commit/9bee082). 
Commenting out just that call at that revision causes 
{{CompactionAndCleanupIT#concurrentCleanup}} to fail frequently. So my question 
is what changes to other parts in the code made {{TarWriter#collectReferences}} 
superfluous later on? I will probably have to {{git bisect}} this later today...

> 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)

Reply via email to