Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 5028 invoked from network); 26 Nov 2010 15:19:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Nov 2010 15:19:42 -0000 Received: (qmail 4951 invoked by uid 500); 26 Nov 2010 15:19:42 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 3950 invoked by uid 500); 26 Nov 2010 15:19:39 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 3935 invoked by uid 99); 26 Nov 2010 15:19:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Nov 2010 15:19:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Nov 2010 15:19:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAQFJERX020649 for ; Fri, 26 Nov 2010 15:19:15 GMT Message-ID: <26572335.324671290784754660.JavaMail.jira@thor> Date: Fri, 26 Nov 2010 10:19:14 -0500 (EST) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Updated: (CASSANDRA-1773) Prevent creation of column_metadata inconsistent with comparator In-Reply-To: <11973609.277571290569355064.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-1773: -------------------------------------- Attachment: 1773-server-side.txt Patch to validate on the server side attached. What we still need on the cli side is attempting to convert column_metadata column names into bytes with the comparator instead of assuming utf8; if they fail to convert a client-side error should be raised. > Prevent creation of column_metadata inconsistent with comparator > ---------------------------------------------------------------- > > Key: CASSANDRA-1773 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1773 > Project: Cassandra > Issue Type: Improvement > Affects Versions: 0.7.0 rc 1 > Reporter: Jonathan Ellis > Assignee: Pavel Yaskevich > Priority: Minor > Fix For: 0.7.0 > > Attachments: 1773-server-side.txt, CASSANDRA-1773.patch > > > {code} > create keyspace clitest with replication_factor = 1 and placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'; > use clitest; > create column family bar with column_type = 'Super' and comparator = 'TimeUUIDType' and subcomparator = 'UTF8Type'; > create column family foo with column_type = 'Super' and comparator = 'TimeUUIDType' and subcomparator = 'UTF8Type' and column_metadata=[{column_name:col1, validation_class:UTF8Type}, {column_name:col2, validation_class:UTF8Type}]; > {code} > then, "describe keyspace clitest" will give "UUIDs must be exactly 16 bytes" because it tries to run "col1" through the comparator getString. > We should check that column names in metadata match the comparator when updating metadata, and also check that the column names are sane if we update the comparator itself. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.