You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Philip Thompson (JIRA)" <ji...@apache.org> on 2014/07/30 19:06:39 UTC
[jira] [Created] (CASSANDRA-7648) ALTER TABLE does not take effect
until nodes are restarted after upgrade from 1.1 -> 1.2
Philip Thompson created CASSANDRA-7648:
------------------------------------------
Summary: ALTER TABLE does not take effect until nodes are restarted after upgrade from 1.1 -> 1.2
Key: CASSANDRA-7648
URL: https://issues.apache.org/jira/browse/CASSANDRA-7648
Project: Cassandra
Issue Type: Bug
Environment: Mac OSX
Reporter: Philip Thompson
Priority: Trivial
A 3 node cluster is started on C* 1.1.12. The following commands are issued over cli:
{code}
CREATE KEYSPACE upgrade with placement_strategy =
'org.apache.cassandra.locator.SimpleStrategy'
and strategy_options = {replication_factor:2};
use upgrade;
CREATE COLUMN FAMILY cf WITH comparator = UTF8Type
AND key_validation_class=IntegerType
AND column_metadata = [
{column_name: v, validation_class: UTF8Type, index_type: KEYS}];
{code}
The cluster is then upgraded to 1.2.18. Both of these versions are installed from source. When the cluster is accessed via cqlsh on 1.2, the CQL column names for table cf are 'key', and 'v'.
According to http://www.datastax.com/dev/blog/thrift-to-cql3, it should be possible to run
{code}
ALTER TABLE cf RENAME key to k;
{code}
After performing the alter table, running 'DESC TABLE' shows that the column name has been successfully renamed to 'k' from 'key'. However, if
{code}
Select k from cf;
{code}
is run, then 'Bad Request: Undefined name k in selection clause' is returned. If the user runs 'select * from cf', the column name shows as 'key' not 'k'. The user is still able to issue queries against 'key', even though 'DESC TABLE' shows
{code}
CREATE TABLE cf (
k varint PRIMARY KEY,
v text
) WITH COMPACT STORAGE AND
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={};
{code}
If the cluster is restarted, it fixes the problem.
--
This message was sent by Atlassian JIRA
(v6.2#6252)