[ 
https://issues.apache.org/jira/browse/CASSANDRA-7119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-7119:
-----------------------------------------

    Reviewer: Benedict

> 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)

Reply via email to