[
https://issues.apache.org/jira/browse/OAK-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15382379#comment-15382379
]
Andrei Dulceanu commented on OAK-4105:
--------------------------------------
[~mduerig] I guess you are right regarding the incorrect removal of that line.
Somehow I presumed that since approximateSize is correctly initiliazed and
after that updated with each write, it would already contain the correct value
at that point. At a second look I figured out that there must be also a
"decreasing update" performed during #cleanup as it is that "increasing update"
after each call to #writeSegment. I will rework my patch taking into account
this and the other suggestion about inlining the content of initialSize().
> Implement FileStore.size through FileStore.approximateSize
> ----------------------------------------------------------
>
> Key: OAK-4105
> URL: https://issues.apache.org/jira/browse/OAK-4105
> Project: Jackrabbit Oak
> Issue Type: Technical task
> Components: segment-tar
> Reporter: Michael Dürig
> Assignee: Andrei Dulceanu
> Priority: Minor
> Labels: resilience
> Fix For: Segment Tar 0.0.6
>
> Attachments: OAK-4105-01.patch
>
>
> {{FileStore.size()}} is prone to lock contention and should not be called too
> often. As OAK-2879 already introduced an approach for tracking the current
> size of the file store without having to lock, we might as well promote his
> to be "the official" implementation.
> [~frm] WDYT?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)