cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Hermes (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2311) type validated row keys
Date Tue, 29 Mar 2011 20:48:06 GMT

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

Jon Hermes commented on CASSANDRA-2311:
---------------------------------------

I'm getting different test failures right now (the system tests are in a state of flux), but
the NPE definitely means the CFMetaData didn't get loaded correctly or we're asking for it
incorrectly.

As for moving vKT into vK, they have different args. 
Assume key K validates correctly. K may validate correctly in CF Foo (because the keyValidator
is a no-op BytesType), but fail to validate in CF Bar (because the keyValidator is something
restrictive such as UTF8, and K is random bytes).
Ideally we'd like to just ask for the CFMD.keyValidator in every vK, but we don't know that
the CF they're asking for is valid either. We happen to have a nice validateCF already, and
it's a waste to duplicate work.

Hence why my original function was names validateKeyInCF... first you validate the key on
its own (it's nonzero bytes, etc.). Then you validate the cf (it's a valid cf in the system).
Lastly you validate that the key IN that cf is altogether valid.

> type validated row keys
> -----------------------
>
>                 Key: CASSANDRA-2311
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2311
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Eric Evans
>            Assignee: Jon Hermes
>              Labels: cql
>             Fix For: 0.8
>
>         Attachments: 2311.txt, v1-0001-CASSANDRA-2311-missed-CFM-conversion.txt
>
>
> The idea here is to allow the assignment of a column-family-wide key type used to perform
validation, (similar to how default_validation_class does for column values).
> This should be as straightforward as extending the column family schema to include the
new attribute, and updating {{ThriftValidation.validateKey}} to validate the key ({{AbstractType.validate}}).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message