cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10309) Avoid always looking up column type
Date Sun, 13 Sep 2015 09:57:46 GMT


Benedict commented on CASSANDRA-10309:

It's not the schema metadata we're looking it up in, but the type stored against the sstable.
There are definitely more performant ways of doing this, though.

* For instance, we could set the map to null if in {{SerializationHeader.Component.toHeader}}
if all of the types match
* We could construct a special {{ColumnDefinition}} type, that contains the type we read from
the sstable, but also stores the "real" {{ColumnDefinition}} as a field; in {{BufferCell.deserialize}}
we could then {{instanceof}} check if we're one of these, and unwrap the {{ColumnDefinition}}
to pass to our constructor.

Although I must admit I'm not super familiar with how we handle type changes. It looks like
we permit type changes that have different representations, but don't make any attempt to
convert the type....

> Avoid always looking up column type
> -----------------------------------
>                 Key: CASSANDRA-10309
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: T Jake Luciani
>            Priority: Minor
>             Fix For: 3.x
> Doing some read profiling I noticed we always seem to look up the type of a column from
the schema metadata when we have the type already in the column class.
> This one simple change to SerializationHeader improves read performance non-trivially.
> I assume we are looking this up to deal with schema changes. But I'm sure there is a
more performant way of doing this.

This message was sent by Atlassian JIRA

View raw message