cassandra-commits mailing list archives

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


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:
>             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|]|[testall|]|[dtest|]

This message was sent by Atlassian JIRA

View raw message