cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8143) Partitioner should not be accessed through StorageService
Date Fri, 31 Jul 2015 12:12:04 GMT


Aleksey Yeschenko commented on CASSANDRA-8143:

Thanks. The patch LGTM, with some nits. Committed to trunk as {{69f77cbddd4c74448f227e9aceef84d345118184}}.

- redundant {{@Override}} for {{BOP.partitionOrdering()}}
- there is no point in checking for a partitioner in the legacy schema tables while migrating,
this ticket being a 3.0 feature
- {{All.get(0).decorateKey}} in {{SchemaKeyspace.makeDropKeyspaceMutation()}} is potentially
error-prone. Should just be {{Keyspaces.decorateKey()}} instead of relying on implicit order

Minor issue:
- we aren't going to store the partitioner in schema, since we aren't (yet? ever?) going to
allow creating tables with non-default partitioner via CQL, externally. For now it's only
2i tables, the new batchlog table, and some hard-coded tables in one external project. All
of them with hardcoded definitions, partitioner redefined explicitly in code.

Some [minor changes|]
I took liberty to make on top (besides fixing the nits):
1. {{partitioner instanceof LocalPartitioner}} is not a sure-fire way to test for 2i after
this patch (and I guess it's taken care of in CASSANDRA-7237), and scanning for the dot in
the name has always been sort of ugly. I pulled {{isIndex}} into a {{boolean}} field in {{CFMetaData}}
2. As you've noticed, {{HHOM.listEndpointsPendingHints()}} logic is weird. It was first changed
to this in CASSANDRA-4568, back when Ice Giants were roaming the Earth and the structure of
the hints table was different. Even then, though, the change was wrong, the token of the node
(pre-vnodes) was still being stored in the partition key. Fixed it in place to return the
stringified UUID instead. Seems like nobody cares though, this being broken since 1.0.12

> Partitioner should not be accessed through StorageService
> ---------------------------------------------------------
>                 Key: CASSANDRA-8143
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Branimir Lambov
>            Assignee: Branimir Lambov
>             Fix For: 3.0 beta 1
> The configured partitioner is no longer the only partitioner in use in the database,
as e.g. index tables use LocalPartitioner.
> To make sure the correct partitioner is used for each table, accesses of StorageService.getPartitioner()
should be replaced with retrieval of the CFS-specific partitioner.

This message was sent by Atlassian JIRA

View raw message