cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Ramirez (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-11443) Prevent (or warn) changing clustering order with ALTER TABLE when data already exists
Date Mon, 28 Mar 2016 04:34:25 GMT
Erick Ramirez created CASSANDRA-11443:

             Summary: Prevent (or warn) changing clustering order with ALTER TABLE when data
already exists
                 Key: CASSANDRA-11443
             Project: Cassandra
          Issue Type: Improvement
          Components: Compaction, CQL
            Reporter: Erick Ramirez

Inexperienced DBAs get caught out on certain schema changes thinking that Cassandra will automatically
retrofit/convert the existing data on disk.

We should prevent users from changing the clustering order on existing tables or they will
run into compaction/read issues such as:

ERROR [CompactionExecutor:6488] 2015-07-14 19:33:14,247 (line 258) Exception
in thread Thread[CompactionExecutor:6488,1,main] 
java.lang.AssertionError: Added column does not sort as the last column 
at org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(

at org.apache.cassandra.db.ColumnFamily.addColumn( 
at org.apache.cassandra.db.ColumnFamily.addAtom( 

at org.apache.cassandra.db.compaction.PrecompactedRow.merge( 
at org.apache.cassandra.db.compaction.PrecompactedRow.<init>(

at org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(

at org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(

at org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(

at org.apache.cassandra.utils.MergeIterator$ManyToOne.consume( 
at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext( 

at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(

at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(

at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(

at org.apache.cassandra.db.compaction.CompactionManager$

at java.util.concurrent.Executors$ 
at java.util.concurrent.ThreadPoolExecutor.runWorker( 
at java.util.concurrent.ThreadPoolExecutor$ 

At the very least, we should report a warning advising users about possible problems when
changing the clustering order if the table is not empty.

This message was sent by Atlassian JIRA

View raw message