cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8109) Avoid constant boxing in ColumnStats.{Min/Max}Tracker
Date Thu, 16 Oct 2014 07:14:33 GMT


Sylvain Lebresne commented on CASSANDRA-8109:

bq. Are you suggesting that these two classes should not be generics at all?

Yes, that's what I'm suggesting.

bq. in MaxTracker/MinTracker "get" method, specifying whether to return int or long will be
tricky depending on the situation

Honestly, those classes are small enough that  I don't think it would be a big deal to just
create 4 classes: MaxIntTracker, MinIntTrack, MaxLongTracker and MinLongTracker. 

> Avoid constant boxing in ColumnStats.{Min/Max}Tracker
> -----------------------------------------------------
>                 Key: CASSANDRA-8109
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Rajanarayanan Thottuvaikkatumana
>            Priority: Minor
>              Labels: lhf
>             Fix For: 3.0
> We use the {{ColumnStats.MinTracker}} and {{ColumnStats.MaxTracker}} to track timestamps
and deletion times in sstable. Those classes are generics but we really ever use them for
longs and integers. The consequence is that every call to their {{update}} method (called
for every cell during sstable write) box it's argument (since we don't store the cell timestamps
and deletion time boxed). That feels like a waste that is easy to fix: we could just make
those work on longs only for instance and convert back to int at the end when that's what
we need.

This message was sent by Atlassian JIRA

View raw message