cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8730) Optimize UUIDType comparisons
Date Mon, 09 Feb 2015 09:31:34 GMT

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

Benedict commented on CASSANDRA-8730:
-------------------------------------

bq. while TimeUUIDType uses ByteBuffer.compareTo which does a byte-signed comparison

Good catch. I would still prefer that these extend each other, because the cleanup is I think
useful and makes it more obvious they are interdependent. But this does eliminate some of
the benefit, and perhaps this should be done in a separate patch.

bq.  Also, as even subtly changing the comparison would have desastrous consequence, it would
be nice to add a few tests that checks that old and new versions compare the same way

Sure. The current code already does some randomized testing, that I was planning to up the
ante on and run a burn test in, but there's no reason not to introduce some specific tests
for a mutation of each conditional comparison in the old code.

bq. As an aside, I personally think this should be targeted at 3.0 (it's not a bug fix).

I have no particular position on this. It's a pretty contained change though, so I would be
comfortable introducing it in 2.1, but have no strong preference versus 3.0. Whilst I was
a bit careless in the extension, I was careful in the UUIDType rewrite to ensure the semantics
of the comparison are the same. The only semantic change I've introduced here is to assert
the size of the data is _exactly_ 16 bytes, or zero, which I'm comfortable omitting, or delaying,
or introducing. However anybody else feels strongly.

> Optimize UUIDType comparisons
> -----------------------------
>
>                 Key: CASSANDRA-8730
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8730
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: J.B. Langston
>            Assignee: Benedict
>             Fix For: 2.1.4
>
>
> Compaction is slow on tables using compound keys containing UUIDs due to being CPU bound
by key comparison.  [~benedict] said he sees some easy optimizations that could be made for
UUID comparison.



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

Mime
View raw message