You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler Hobbs (JIRA)" <ji...@apache.org> on 2014/04/03 02:20:17 UTC
[jira] [Updated] (CASSANDRA-6978) Table creation does not add all
the columns until schema is updated again
[ https://issues.apache.org/jira/browse/CASSANDRA-6978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tyler Hobbs updated CASSANDRA-6978:
-----------------------------------
Attachment: 6978.txt
When I merged CASSANDRA-6825 to 2.1, I didn't port a piece of the logic for skipping sstables correctly. The attached patch corrects that, adds a test to cover that specific case, and fixes a compiler warning for that test class.
> Table creation does not add all the columns until schema is updated again
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-6978
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6978
> Project: Cassandra
> Issue Type: Bug
> Reporter: Ryan McGuire
> Assignee: Tyler Hobbs
> Attachments: 6978.txt
>
>
> Table creation does not show the columns just created:
> {code}
> cqlsh> CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
> cqlsh>
> cqlsh> // Create a table with multiple columns:
> cqlsh> CREATE TABLE ks.cf (
> ... key int PRIMARY KEY,
> ... val blob,
> ... val2 text,
> ... ryan text
> ... );
> cqlsh>
> cqlsh> //List the table, but notice that none of the columns exist except for the primary key:
> cqlsh> DESCRIBE TABLE ks.cf;
> CREATE TABLE ks.cf (
> key int PRIMARY KEY
> ) WITH bloom_filter_fp_chance = 0.01
> AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
> AND comment = ''
> AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
> AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND populate_io_cache_on_flush = false
> AND read_repair_chance = 0.1
> AND speculative_retry = '99.0PERCENTILE';
> cqlsh>
> cqlsh> //Create a 2nd table
> cqlsh> CREATE TABLE ks.cf2 (
> ... key int PRIMARY KEY,
> ... val blob,
> ... val2 text,
> ... ryan text
> ... );
> cqlsh>
> cqlsh> //List the first table again, and notice the columns are there now!
> cqlsh> DESCRIBE TABLE ks.cf;
> CREATE TABLE ks.cf (
> key int PRIMARY KEY,
> ryan text,
> val blob,
> val2 text
> ) WITH bloom_filter_fp_chance = 0.01
> AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
> AND comment = ''
> AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
> AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND populate_io_cache_on_flush = false
> AND read_repair_chance = 0.1
> AND speculative_retry = '99.0PERCENTILE';
> cqlsh>
> cqlsh> //I can't insert anything into it though:
> cqlsh> INSERT INTO ks.cf (key, val2) VALUES (1, 'test');
> code=2200 [Invalid query] message="Unknown identifier val2"
> cqlsh>
> {code}
> I bisected this behavior to a merge commit in 2.1: e34d1af963b85c46afc973221a296498eaba8264 - I'm always dubious when I bisect to a merge commit, but I tried it twice (:/) - This fails in trunk as well, but not in 2.0.
--
This message was sent by Atlassian JIRA
(v6.2#6252)