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 2017/05/09 15:36:04 UTC
[jira] [Commented] (OAK-4582) Split Segment in a read-only and a
read-write implementations
[ https://issues.apache.org/jira/browse/OAK-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002884#comment-16002884 ]
Michael Dürig commented on OAK-4582:
------------------------------------
Re. [{{org.apache.jackrabbit.oak.segment.RecordReader}}|https://github.com/francescomari/jackrabbit-oak/blob/756eb94b5c999808d6839cc28da6097bbec5796d/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/RecordReader.java]:
I generally like this approach and the separations of concerns that go along with it. The code is much more approachable than before. My main concerns are regarding performance. ({{RecordReader#value(int, int)}} creates many extra {{ByteBuffer}} instances, which might have a negative impact. Furthermore there might be an impact of creating those extra {{RawTemplate}} and {{RawRecordId}} instances (thanks Java for not providing decent and cheap record types!).
Before going much further with this work, let's do a quick round of benchmarking to better understand this.
> Split Segment in a read-only and a read-write implementations
> -------------------------------------------------------------
>
> Key: OAK-4582
> URL: https://issues.apache.org/jira/browse/OAK-4582
> Project: Jackrabbit Oak
> Issue Type: Technical task
> Components: segment-tar
> Reporter: Francesco Mari
> Assignee: Francesco Mari
> Labels: technical_debt
> Fix For: 1.8
>
>
> {{Segment}} is central to the working of the Segment Store, but it currently serves two purposes:
> # It is a temporary storage location for the currently written segment, waiting to be full and flushed to disk.
> # It is a way to parse serialzed segments read from disk.
> To distinguish these two use cases, I suggest to promote {{Segment}} to the status of interface, and to create two different implementations for a read-only and a read-write segments.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)