[jira] [Updated] (CASSANDRA-10424) Altering base table column with materialized view causes unexpected server error.

2017-06-22 Thread Jeremy Hanna (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeremy Hanna updated CASSANDRA-10424:
-
Component/s: Materialized Views

> Altering base table column with materialized view causes unexpected server 
> error.
> -
>
> Key: CASSANDRA-10424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10424
> Project: Cassandra
>  Issue Type: Bug
>  Components: Coordination, Materialized Views
> Environment: cassandra-3.0.0-rc1, with python driver 3.0-alpha
>Reporter: Greg Bestland
>Assignee: Carl Yeksigian
> Fix For: 3.0.0 rc2
>
>
> When attempting to alter column type of base table which has a corresponding  
> materialized view we get an exception from the server.
> Steps to reproduce.
> 1. Create a base table
> {code}
> CREATE TABLE test.scores(
> user TEXT,
> game TEXT,
> year INT,
> month INT,
> day INT,
> score TEXT,
> PRIMARY KEY (user, game, year, month, day)
> )
> {code}
> 2. Create a corresponding materialized view
> {code}
> CREATE MATERIALIZED VIEW test.monthlyhigh AS
> SELECT game, year, month, score, user, day FROM test.scores
> WHERE game IS NOT NULL AND year IS NOT NULL AND month IS NOT 
> NULL AND score IS NOT NULL AND user IS NOT NULL AND day IS NOT NULL
> PRIMARY KEY ((game, year, month), score, user, day)
> WITH CLUSTERING ORDER BY (score DESC, user ASC, day ASC)
> {code}
> 3. Attempt to Alter the base table 
> {code}
> ALTER TABLE test.scores ALTER score TYPE blob
> {code}
> In the python driver we see the following exception returned from the server
> {code}
> Ignoring schedule_unique for already-scheduled task: ( ControlConnection.refresh_schema of  object at 0x100f72c50>>, (), (('keyspace', 'test'), ('target_type', 
> 'KEYSPACE'), ('change_type', 'UPDATED')))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "./cassandra/cluster.py", line 1623, in execute
> result = future.result()
>   File "./cassandra/cluster.py", line 3205, in result
> raise self._final_exception
> cassandra.protocol.ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are not compatible (found ClusteringComparator; 
> expected ClusteringComparator).">
> {code}
> On the server I see the following stack trace
> {code}
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,457 ColumnFamilyStore.java:825 - 
> Enqueuing flush of keyspaces: 512 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,457 Memtable.java:362 - 
> Writing Memtable-keyspaces@1714565887(0.146KiB serialized bytes, 1 ops, 0%/0% 
> of on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,463 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/ma-54-big-Data.db
>  (0.109KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,472 ColumnFamilyStore.java:825 - 
> Enqueuing flush of columns: 877 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,472 Memtable.java:362 - 
> Writing Memtable-columns@771367282(0.182KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,478 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/ma-51-big-Data.db
>  (0.107KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,490 ColumnFamilyStore.java:825 - 
> Enqueuing flush of views: 2641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,490 Memtable.java:362 - 
> Writing Memtable-views@1740452585(0.834KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,496 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/views-9786ac1cdd583201a7cdad556410c985/ma-22-big-Data.db
>  (0.542KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> ERROR [MigrationStage:1] 2015-09-30 11:45:47,507 CassandraDaemon.java:195 - 
> Exception in thread Thread[MigrationStage:1,5,main]
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> 

[jira] [Updated] (CASSANDRA-10424) Altering base table column with materialized view causes unexpected server error.

2015-11-23 Thread Carl Yeksigian (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carl Yeksigian updated CASSANDRA-10424:
---
Component/s: Coordination

> Altering base table column with materialized view causes unexpected server 
> error.
> -
>
> Key: CASSANDRA-10424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10424
> Project: Cassandra
>  Issue Type: Bug
>  Components: Coordination
> Environment: cassandra-3.0.0-rc1, with python driver 3.0-alpha
>Reporter: Greg Bestland
>Assignee: Carl Yeksigian
> Fix For: 3.0.0 rc2
>
>
> When attempting to alter column type of base table which has a corresponding  
> materialized view we get an exception from the server.
> Steps to reproduce.
> 1. Create a base table
> {code}
> CREATE TABLE test.scores(
> user TEXT,
> game TEXT,
> year INT,
> month INT,
> day INT,
> score TEXT,
> PRIMARY KEY (user, game, year, month, day)
> )
> {code}
> 2. Create a corresponding materialized view
> {code}
> CREATE MATERIALIZED VIEW test.monthlyhigh AS
> SELECT game, year, month, score, user, day FROM test.scores
> WHERE game IS NOT NULL AND year IS NOT NULL AND month IS NOT 
> NULL AND score IS NOT NULL AND user IS NOT NULL AND day IS NOT NULL
> PRIMARY KEY ((game, year, month), score, user, day)
> WITH CLUSTERING ORDER BY (score DESC, user ASC, day ASC)
> {code}
> 3. Attempt to Alter the base table 
> {code}
> ALTER TABLE test.scores ALTER score TYPE blob
> {code}
> In the python driver we see the following exception returned from the server
> {code}
> Ignoring schedule_unique for already-scheduled task: ( ControlConnection.refresh_schema of  object at 0x100f72c50>>, (), (('keyspace', 'test'), ('target_type', 
> 'KEYSPACE'), ('change_type', 'UPDATED')))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "./cassandra/cluster.py", line 1623, in execute
> result = future.result()
>   File "./cassandra/cluster.py", line 3205, in result
> raise self._final_exception
> cassandra.protocol.ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are not compatible (found ClusteringComparator; 
> expected ClusteringComparator).">
> {code}
> On the server I see the following stack trace
> {code}
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,457 ColumnFamilyStore.java:825 - 
> Enqueuing flush of keyspaces: 512 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,457 Memtable.java:362 - 
> Writing Memtable-keyspaces@1714565887(0.146KiB serialized bytes, 1 ops, 0%/0% 
> of on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,463 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/ma-54-big-Data.db
>  (0.109KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,472 ColumnFamilyStore.java:825 - 
> Enqueuing flush of columns: 877 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,472 Memtable.java:362 - 
> Writing Memtable-columns@771367282(0.182KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,478 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/ma-51-big-Data.db
>  (0.107KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,490 ColumnFamilyStore.java:825 - 
> Enqueuing flush of views: 2641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,490 Memtable.java:362 - 
> Writing Memtable-views@1740452585(0.834KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,496 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/views-9786ac1cdd583201a7cdad556410c985/ma-22-big-Data.db
>  (0.542KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> ERROR [MigrationStage:1] 2015-09-30 11:45:47,507 CassandraDaemon.java:195 - 
> Exception in thread Thread[MigrationStage:1,5,main]
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not 

[jira] [Updated] (CASSANDRA-10424) Altering base table column with materialized view causes unexpected server error.

2015-10-02 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-10424:
-
Reviewer: Sylvain Lebresne  (was: Aleksey Yeschenko)

> Altering base table column with materialized view causes unexpected server 
> error.
> -
>
> Key: CASSANDRA-10424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10424
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: cassandra-3.0.0-rc1, with python driver 3.0-alpha
>Reporter: Greg Bestland
>Assignee: Carl Yeksigian
> Fix For: 3.0.0 rc2
>
>
> When attempting to alter column type of base table which has a corresponding  
> materialized view we get an exception from the server.
> Steps to reproduce.
> 1. Create a base table
> {code}
> CREATE TABLE test.scores(
> user TEXT,
> game TEXT,
> year INT,
> month INT,
> day INT,
> score TEXT,
> PRIMARY KEY (user, game, year, month, day)
> )
> {code}
> 2. Create a corresponding materialized view
> {code}
> CREATE MATERIALIZED VIEW test.monthlyhigh AS
> SELECT game, year, month, score, user, day FROM test.scores
> WHERE game IS NOT NULL AND year IS NOT NULL AND month IS NOT 
> NULL AND score IS NOT NULL AND user IS NOT NULL AND day IS NOT NULL
> PRIMARY KEY ((game, year, month), score, user, day)
> WITH CLUSTERING ORDER BY (score DESC, user ASC, day ASC)
> {code}
> 3. Attempt to Alter the base table 
> {code}
> ALTER TABLE test.scores ALTER score TYPE blob
> {code}
> In the python driver we see the following exception returned from the server
> {code}
> Ignoring schedule_unique for already-scheduled task: ( ControlConnection.refresh_schema of  object at 0x100f72c50>>, (), (('keyspace', 'test'), ('target_type', 
> 'KEYSPACE'), ('change_type', 'UPDATED')))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "./cassandra/cluster.py", line 1623, in execute
> result = future.result()
>   File "./cassandra/cluster.py", line 3205, in result
> raise self._final_exception
> cassandra.protocol.ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are not compatible (found ClusteringComparator; 
> expected ClusteringComparator).">
> {code}
> On the server I see the following stack trace
> {code}
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,457 ColumnFamilyStore.java:825 - 
> Enqueuing flush of keyspaces: 512 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,457 Memtable.java:362 - 
> Writing Memtable-keyspaces@1714565887(0.146KiB serialized bytes, 1 ops, 0%/0% 
> of on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,463 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/ma-54-big-Data.db
>  (0.109KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,472 ColumnFamilyStore.java:825 - 
> Enqueuing flush of columns: 877 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,472 Memtable.java:362 - 
> Writing Memtable-columns@771367282(0.182KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,478 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/ma-51-big-Data.db
>  (0.107KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,490 ColumnFamilyStore.java:825 - 
> Enqueuing flush of views: 2641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,490 Memtable.java:362 - 
> Writing Memtable-views@1740452585(0.834KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,496 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/views-9786ac1cdd583201a7cdad556410c985/ma-22-big-Data.db
>  (0.542KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> ERROR [MigrationStage:1] 2015-09-30 11:45:47,507 CassandraDaemon.java:195 - 
> Exception in thread Thread[MigrationStage:1,5,main]
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> 

[jira] [Updated] (CASSANDRA-10424) Altering base table column with materialized view causes unexpected server error.

2015-10-02 Thread Carl Yeksigian (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carl Yeksigian updated CASSANDRA-10424:
---
Fix Version/s: (was: 3.0.x)
   3.0.0 rc2

> Altering base table column with materialized view causes unexpected server 
> error.
> -
>
> Key: CASSANDRA-10424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10424
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: cassandra-3.0.0-rc1, with python driver 3.0-alpha
>Reporter: Greg Bestland
>Assignee: Carl Yeksigian
> Fix For: 3.0.0 rc2
>
>
> When attempting to alter column type of base table which has a corresponding  
> materialized view we get an exception from the server.
> Steps to reproduce.
> 1. Create a base table
> {code}
> CREATE TABLE test.scores(
> user TEXT,
> game TEXT,
> year INT,
> month INT,
> day INT,
> score TEXT,
> PRIMARY KEY (user, game, year, month, day)
> )
> {code}
> 2. Create a corresponding materialized view
> {code}
> CREATE MATERIALIZED VIEW test.monthlyhigh AS
> SELECT game, year, month, score, user, day FROM test.scores
> WHERE game IS NOT NULL AND year IS NOT NULL AND month IS NOT 
> NULL AND score IS NOT NULL AND user IS NOT NULL AND day IS NOT NULL
> PRIMARY KEY ((game, year, month), score, user, day)
> WITH CLUSTERING ORDER BY (score DESC, user ASC, day ASC)
> {code}
> 3. Attempt to Alter the base table 
> {code}
> ALTER TABLE test.scores ALTER score TYPE blob
> {code}
> In the python driver we see the following exception returned from the server
> {code}
> Ignoring schedule_unique for already-scheduled task: ( ControlConnection.refresh_schema of  object at 0x100f72c50>>, (), (('keyspace', 'test'), ('target_type', 
> 'KEYSPACE'), ('change_type', 'UPDATED')))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "./cassandra/cluster.py", line 1623, in execute
> result = future.result()
>   File "./cassandra/cluster.py", line 3205, in result
> raise self._final_exception
> cassandra.protocol.ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are not compatible (found ClusteringComparator; 
> expected ClusteringComparator).">
> {code}
> On the server I see the following stack trace
> {code}
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,457 ColumnFamilyStore.java:825 - 
> Enqueuing flush of keyspaces: 512 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,457 Memtable.java:362 - 
> Writing Memtable-keyspaces@1714565887(0.146KiB serialized bytes, 1 ops, 0%/0% 
> of on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,463 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/ma-54-big-Data.db
>  (0.109KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,472 ColumnFamilyStore.java:825 - 
> Enqueuing flush of columns: 877 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,472 Memtable.java:362 - 
> Writing Memtable-columns@771367282(0.182KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,478 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/ma-51-big-Data.db
>  (0.107KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,490 ColumnFamilyStore.java:825 - 
> Enqueuing flush of views: 2641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,490 Memtable.java:362 - 
> Writing Memtable-views@1740452585(0.834KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,496 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/views-9786ac1cdd583201a7cdad556410c985/ma-22-big-Data.db
>  (0.542KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> ERROR [MigrationStage:1] 2015-09-30 11:45:47,507 CassandraDaemon.java:195 - 
> Exception in thread Thread[MigrationStage:1,5,main]
> org.apache.cassandra.exceptions.ConfigurationException: Column family 

[jira] [Updated] (CASSANDRA-10424) Altering base table column with materialized view causes unexpected server error.

2015-09-30 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-10424:

 Assignee: Carl Yeksigian
Fix Version/s: 3.0.x

> Altering base table column with materialized view causes unexpected server 
> error.
> -
>
> Key: CASSANDRA-10424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10424
> Project: Cassandra
>  Issue Type: Bug
> Environment: cassandra-3.0.0-rc1, with python driver 3.0-alpha
>Reporter: Greg Bestland
>Assignee: Carl Yeksigian
> Fix For: 3.0.x
>
>
> When attempting to alter column type of base table which has a corresponding  
> materialized view we get an exception from the server.
> Steps to reproduce.
> 1. Create a base table
> {code}
> CREATE TABLE test.scores(
> user TEXT,
> game TEXT,
> year INT,
> month INT,
> day INT,
> score TEXT,
> PRIMARY KEY (user, game, year, month, day)
> )
> {code}
> 2. Create a corresponding materialized view
> {code}
> CREATE MATERIALIZED VIEW test.monthlyhigh AS
> SELECT game, year, month, score, user, day FROM test.scores
> WHERE game IS NOT NULL AND year IS NOT NULL AND month IS NOT 
> NULL AND score IS NOT NULL AND user IS NOT NULL AND day IS NOT NULL
> PRIMARY KEY ((game, year, month), score, user, day)
> WITH CLUSTERING ORDER BY (score DESC, user ASC, day ASC)
> {code}
> 3. Attempt to Alter the base table 
> {code}
> ALTER TABLE test.scores ALTER score TYPE blob
> {code}
> In the python driver we see the following exception returned from the server
> {code}
> Ignoring schedule_unique for already-scheduled task: ( ControlConnection.refresh_schema of  object at 0x100f72c50>>, (), (('keyspace', 'test'), ('target_type', 
> 'KEYSPACE'), ('change_type', 'UPDATED')))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "./cassandra/cluster.py", line 1623, in execute
> result = future.result()
>   File "./cassandra/cluster.py", line 3205, in result
> raise self._final_exception
> cassandra.protocol.ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are not compatible (found ClusteringComparator; 
> expected ClusteringComparator).">
> {code}
> On the server I see the following stack trace
> {code}
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,457 ColumnFamilyStore.java:825 - 
> Enqueuing flush of keyspaces: 512 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,457 Memtable.java:362 - 
> Writing Memtable-keyspaces@1714565887(0.146KiB serialized bytes, 1 ops, 0%/0% 
> of on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,463 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/ma-54-big-Data.db
>  (0.109KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,472 ColumnFamilyStore.java:825 - 
> Enqueuing flush of columns: 877 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,472 Memtable.java:362 - 
> Writing Memtable-columns@771367282(0.182KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,478 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/ma-51-big-Data.db
>  (0.107KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,490 ColumnFamilyStore.java:825 - 
> Enqueuing flush of views: 2641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,490 Memtable.java:362 - 
> Writing Memtable-views@1740452585(0.834KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,496 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/views-9786ac1cdd583201a7cdad556410c985/ma-22-big-Data.db
>  (0.542KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> ERROR [MigrationStage:1] 2015-09-30 11:45:47,507 CassandraDaemon.java:195 - 
> Exception in thread Thread[MigrationStage:1,5,main]
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are 

[jira] [Updated] (CASSANDRA-10424) Altering base table column with materialized view causes unexpected server error.

2015-09-30 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-10424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-10424:

Reproduced In: 3.0.0 rc1
  Component/s: Core

> Altering base table column with materialized view causes unexpected server 
> error.
> -
>
> Key: CASSANDRA-10424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10424
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: cassandra-3.0.0-rc1, with python driver 3.0-alpha
>Reporter: Greg Bestland
>Assignee: Carl Yeksigian
> Fix For: 3.0.x
>
>
> When attempting to alter column type of base table which has a corresponding  
> materialized view we get an exception from the server.
> Steps to reproduce.
> 1. Create a base table
> {code}
> CREATE TABLE test.scores(
> user TEXT,
> game TEXT,
> year INT,
> month INT,
> day INT,
> score TEXT,
> PRIMARY KEY (user, game, year, month, day)
> )
> {code}
> 2. Create a corresponding materialized view
> {code}
> CREATE MATERIALIZED VIEW test.monthlyhigh AS
> SELECT game, year, month, score, user, day FROM test.scores
> WHERE game IS NOT NULL AND year IS NOT NULL AND month IS NOT 
> NULL AND score IS NOT NULL AND user IS NOT NULL AND day IS NOT NULL
> PRIMARY KEY ((game, year, month), score, user, day)
> WITH CLUSTERING ORDER BY (score DESC, user ASC, day ASC)
> {code}
> 3. Attempt to Alter the base table 
> {code}
> ALTER TABLE test.scores ALTER score TYPE blob
> {code}
> In the python driver we see the following exception returned from the server
> {code}
> Ignoring schedule_unique for already-scheduled task: ( ControlConnection.refresh_schema of  object at 0x100f72c50>>, (), (('keyspace', 'test'), ('target_type', 
> 'KEYSPACE'), ('change_type', 'UPDATED')))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "./cassandra/cluster.py", line 1623, in execute
> result = future.result()
>   File "./cassandra/cluster.py", line 3205, in result
> raise self._final_exception
> cassandra.protocol.ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
> comparators do not match or are not compatible (found ClusteringComparator; 
> expected ClusteringComparator).">
> {code}
> On the server I see the following stack trace
> {code}
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,457 ColumnFamilyStore.java:825 - 
> Enqueuing flush of keyspaces: 512 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,457 Memtable.java:362 - 
> Writing Memtable-keyspaces@1714565887(0.146KiB serialized bytes, 1 ops, 0%/0% 
> of on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,463 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/keyspaces-abac5682dea631c5b535b3d6cffd0fb6/ma-54-big-Data.db
>  (0.109KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,472 ColumnFamilyStore.java:825 - 
> Enqueuing flush of columns: 877 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,472 Memtable.java:362 - 
> Writing Memtable-columns@771367282(0.182KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:12] 2015-09-30 11:45:47,478 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/columns-24101c25a2ae3af787c1b40ee1aca33f/ma-51-big-Data.db
>  (0.107KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> INFO  [MigrationStage:1] 2015-09-30 11:45:47,490 ColumnFamilyStore.java:825 - 
> Enqueuing flush of views: 2641 (0%) on-heap, 0 (0%) off-heap
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,490 Memtable.java:362 - 
> Writing Memtable-views@1740452585(0.834KiB serialized bytes, 1 ops, 0%/0% of 
> on/off-heap limit)
> INFO  [MemtableFlushWriter:11] 2015-09-30 11:45:47,496 Memtable.java:395 - 
> Completed flushing 
> /Users/gregbestland/.ccm/tests/node1/data/system_schema/views-9786ac1cdd583201a7cdad556410c985/ma-22-big-Data.db
>  (0.542KiB) for commitlog position ReplayPosition(segmentId=1443623481894, 
> position=9812)
> ERROR [MigrationStage:1] 2015-09-30 11:45:47,507 CassandraDaemon.java:195 - 
> Exception in thread Thread[MigrationStage:1,5,main]
> org.apache.cassandra.exceptions.ConfigurationException: Column family 
>