cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Ramirez (JIRA)" <j...@apache.org>
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
                 URL: https://issues.apache.org/jira/browse/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:

{noformat}
ERROR [CompactionExecutor:6488] 2015-07-14 19:33:14,247 CassandraDaemon.java (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(ArrayBackedSortedColumns.java:116)

at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:121) 
at org.apache.cassandra.db.ColumnFamily.addAtom(ColumnFamily.java:155) 
at org.apache.cassandra.io.sstable.SSTableIdentityIterator.getColumnFamilyWithColumns(SSTableIdentityIterator.java:186)

at org.apache.cassandra.db.compaction.PrecompactedRow.merge(PrecompactedRow.java:98) 
at org.apache.cassandra.db.compaction.PrecompactedRow.<init>(PrecompactedRow.java:85)

at org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:196)

at org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:74)

at org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:55)

at org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(MergeIterator.java:115) 
at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:98) 
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)

at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) 
at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:164)

at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) 
at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)

at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)

at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:198)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at java.lang.Thread.run(Thread.java:745)
{noformat}

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
(v6.3.4#6332)

Mime
View raw message