cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Branimir Lambov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12342) CLibrary improvements
Date Thu, 04 Aug 2016 09:59:20 GMT

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

Branimir Lambov commented on CASSANDRA-12342:
---------------------------------------------

Could you explain (in a comment) why it is necessary for the {{FileChannel}} field to be retrieved
on first use, while the {{FileDescriptor}} one can be initialized statically, and why it is
okay to use the field retrieved from one instance of {{FileChannel}} to all others (which
could potentially have a different type)?

Please expand the field names, {{fcFdField}} is too cryptic.

If we don't (plan to) reuse the {{OS_X}} booleans outside of the static initializer, I would
make them local to it.

> CLibrary improvements
> ---------------------
>
>                 Key: CASSANDRA-12342
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12342
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 3.x
>
>
> {{CLibrary}} uses {{FBUtilities.getProtectedField}} for each invocation of {{getfd}}
- i.e. {{Class.getDeclaredField}} + {{Field.setAccessible}}. Linked patch migrates these {{Field}}
references to static class fields + adds constants for the OS. Also adds a tiny optimization
for non-linux OSs in {{trySync}}.
> ||trunk|[branch|https://github.com/apache/cassandra/compare/trunk...snazy:CLibrary-opts]|[testall|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-CLibrary-opts-testall/lastSuccessfulBuild/]|[dtest|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-CLibrary-opts-dtest/lastSuccessfulBuild/]



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

Mime
View raw message