You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2016/07/20 14:34:20 UTC

[jira] [Updated] (OAK-4579) Improve FileStore.size calculation

     [ https://issues.apache.org/jira/browse/OAK-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig updated OAK-4579:
-------------------------------
    Description: 
A new approach for calculating {{FileStore::size}} is needed because this method is prone to lock contention and should not be called too often.

The steps to implement the approach are:
* reduce the lock surface of the size() method. This should be simple enough by creating a copy of the readers / writer inside the lock and do the actual size calculation on that snapshot but outside of the lock.
* lower size() visibility to package to avoid misuse (from monitoring tools)
* remove {{approximateSize}} and associated logic and replace it with {{size()}}.


  was:
A new approach for calculating {{FileStore::size}} is needed because this method is prone to lock contention and should not be called too often.

The steps to implement the approach are:
* reduce the lock surface of the size() method. This should be simple enough by creating a copy of the readers / writer inside the lock and do the actual size calculation on that snapshot but outside of the lock.
* lower size() visibility to package to avoid misuse (from monitoring tools)


> Improve FileStore.size calculation
> ----------------------------------
>
>                 Key: OAK-4579
>                 URL: https://issues.apache.org/jira/browse/OAK-4579
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: segment-tar
>            Reporter: Andrei Dulceanu
>            Assignee: Andrei Dulceanu
>            Priority: Minor
>              Labels: resilience
>             Fix For: Segment Tar 0.0.6
>
>
> A new approach for calculating {{FileStore::size}} is needed because this method is prone to lock contention and should not be called too often.
> The steps to implement the approach are:
> * reduce the lock surface of the size() method. This should be simple enough by creating a copy of the readers / writer inside the lock and do the actual size calculation on that snapshot but outside of the lock.
> * lower size() visibility to package to avoid misuse (from monitoring tools)
> * remove {{approximateSize}} and associated logic and replace it with {{size()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)