cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8893) RandomAccessReader should share its FileChannel with all instances (via SegmentedFile)
Date Fri, 03 Apr 2015 08:25:53 GMT

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

Stefania commented on CASSANDRA-8893:
-------------------------------------

Benedict, take a look at the patch attached and let me know if this is what you had in mind.
The entry point is ChannelProxy which wraps a file channel in a ref counted way and ensures
that only thread safe operations are accessible. It also translates the IO exceptions into
unchecked exceptions.

The channel proxy is shared by Builder, SegmentedFile and RandomAccessReader instances.

In the Builder we can receive different file paths in the complete methods, in which case
we close the old channel and create a new one. This is the part I was not entirely sure about.

The remaining changes are either mechanical to pass the channel around, or fixes to remove
leaks of the channel, mostly in the unit tests.

> RandomAccessReader should share its FileChannel with all instances (via SegmentedFile)
> --------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8893
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8893
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Stefania
>             Fix For: 3.0
>
>
> There's no good reason to open a FileChannel for each \(Compressed\)\?RandomAccessReader,
and this would simplify RandomAccessReader to just a thin wrapper.



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

Mime
View raw message