jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-6915) Minimize the amount of uncached segment reads
Date Fri, 10 Nov 2017 09:02:00 GMT

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

Michael Dürig commented on OAK-6915:

bq. the ratio between data segment ID allocations and number of written data segments shows
something important: segment IDs are not as perfectly internalized as we thought. 

I don't think this is conclusive yet as these numbers do not allow us to differentiate between
allocations at the same point in time or reallocations happening later on because an segment
id was gc'ed. Reviewing the code it is very hard to imagine how internalizing of {{SegmentId}}
instanced could not work. A sneaky bug in {{SegmentIdTable}} would look like the most likely
cause to me ATM. 

bq. SegmentCache should not depend on SegmentId to be perfectly internalized. It is very easy
to break this design assumption, and the consequences of it are usually disastrous. It is,
in my opinion, better to implement a cache that doesn't work with this assumption in mind.

I agree with this assumption / design being brittle somehow. Your proposal to move the segment
cache a layer down (OAK-6919) looks like a good first step in decoupling things.

> Minimize the amount of uncached segment reads
> ---------------------------------------------
>                 Key: OAK-6915
>                 URL: https://issues.apache.org/jira/browse/OAK-6915
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>             Fix For: 1.8, 1.7.12
>         Attachments: OAK-6915-01.patch, OAK-6915-02.patch, OAK-6915-diagnostics-02.patch,
OAK-6915-diagnostics.patch, OAK-6915.patch, Screen Shot 2017-11-09 at 14.14.28.png, Screen
Shot 2017-11-09 at 14.16.59.png
> The current implementation of {{SegmentCache}} should make better use of the underlying
Guava cache by relying on the cached segments instead of unconditionally performing an uncached
segment read via the {{Callable<Segment>}} passed to {{SegmentCache#getSegment}}.

This message was sent by Atlassian JIRA

View raw message