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-3690) Decouple SegmentBufferWriter from SegmentStore
Date Wed, 01 Mar 2017 15:15:45 GMT

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

Michael Dürig commented on OAK-3690:
------------------------------------

Taking this one up again lead to a bit of refactoring. Basically I had to rip the {{SegmentStore}}
apart. Now {{SegmentStore}} only consists of the methods dealing with reading and writing
of segments. The methods pertaining to {{SegmentId}} instances moved to a new interface {{SegmentIdProvider}},
which is actually implemented by the {{SegmentTracker}}. These changes allow me to reduce
passing {{SegmentStore}} and {{SegmentTracker}} instances around but instead rely on an {{SegmentIdProvider}}
instance. Finally this results in the desired decoupling of {{SegmentBufferWriter}} and related
with the additional goodie that the counter for {{SegmentId}} instances is not part of {{SegmentIdProvider}}
and does not need to be passed in separately any more. 

[~frm] as you were involved in similar refactorings lately, could you have a look at this:
https://github.com/mduerig/jackrabbit-oak/commits/OAK-3690? I structured it into a couple
of commits with the commit messages explaining further details. 

> Decouple SegmentBufferWriter from SegmentStore
> ----------------------------------------------
>
>                 Key: OAK-3690
>                 URL: https://issues.apache.org/jira/browse/OAK-3690
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: technical_debt
>             Fix For: 1.8
>
>
> Currently {{SegmentBufferWriter.flush()}} directly calls {{SegmentStore.writeSegment()}}
once the current segment does not have enough space for the next record. We should try to
cut this dependency as {{SegmentBufferWriter}} should only be concerned with providing buffers
for segments. Actually writing these to the store should be handled by a higher level component.

> A number of deadlock (e.g. (OAK-2560, OAK-3179, OAK-3264) we have seen is one manifestation
of this troublesome dependency. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message