cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7119) Optimise isLive(System.currentTimeMillis()) + minor Cell cleanup
Date Wed, 30 Apr 2014 17:22:15 GMT

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

Aleksey Yeschenko commented on CASSANDRA-7119:
----------------------------------------------

Pushed the trivial commit to https://github.com/iamaleksey/cassandra/commits/7119

> Optimise isLive(System.currentTimeMillis()) + minor Cell cleanup
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-7119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7119
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
>             Fix For: 2.1 beta2
>
>
> There are lots of Cell#isMakredForDeleteAt(System.currentTimeMillis()) and Cell#isLive(System.currentTimeMillis())
calls in the codebase - including in Cell#reconcile(), while we only need to pass the current
time to the ExpiringCell. System.currentTimeMillis() is cheap, but not calling it at all is
cheaper (and it's not *that* cheap when virtualised under certain configs).
> There is also another form - calling isMarkedForDelete() with Long.MIN_VALUE/Long.MAX_VALUE,
when we know we aren't expecting an ExpiringCell, ever.
> So the patch adds an argument-less isLive() method that only calls System.currentTimeMillis()
for ExpiringCell.
> To reduce duplication between Native* and Buffer*, isMarkedForDelete() has been removed
entirely in favor of the shorter-to-type isLive() (plus I never really liked the name anyway).
> Also performs minor clean up and fixes one minor bug:
> - removes the unused Cell#getMarkedForDeleteAt() method
> - removes redundant Override-s in AbstractCell
> - corrects BufferCounterUpdateCell#reconcile() to sum the timestamps and not pick the
max (must have slipped through 6694)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message