cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrés de la Peña (JIRA) <>
Subject [jira] [Created] (CASSANDRA-13737) Node start can fail if the base table of a materialized view is not found
Date Tue, 01 Aug 2017 18:38:00 GMT
Andrés de la Peña created CASSANDRA-13737:

             Summary: Node start can fail if the base table of a materialized view is not
                 Key: CASSANDRA-13737
             Project: Cassandra
          Issue Type: Bug
          Components: Distributed Metadata, Materialized Views
            Reporter: Andrés de la Peña
            Assignee: Andrés de la Peña
             Fix For: 3.0.x, 3.11.x, 4.x

Node start can fail if the base table of a materialized view is not found, which is something
that can happen under certain circumstances. There is a dtest reproducing the problem:
cluster = self.cluster
node1, node2, node3 = self.cluster.nodelist()
session = self.patient_cql_connection(node1, consistency_level=ConsistencyLevel.QUORUM)
create_ks(session, 'ks', 3)

session.execute('CREATE TABLE users (username varchar PRIMARY KEY, state varchar)')


# create a materialized view only in nodes 1 and 2
session.execute(('CREATE MATERIALIZED VIEW users_by_state AS '
                 'SELECT * FROM users WHERE state IS NOT NULL AND username IS NOT NULL '
                 'PRIMARY KEY (state, username)'))


# drop the base table only in node 3
session = self.patient_cql_connection(node3, consistency_level=ConsistencyLevel.QUORUM)
session.execute('DROP TABLE ks.users')

cluster.start()  # Fails
This is the error during node start:
java.lang.IllegalArgumentException: Unknown CF 958ebc30-76e4-11e7-869a-9d8367a71c76
	at org.apache.cassandra.db.Keyspace.getColumnFamilyStore( ~[main/:na]
	at org.apache.cassandra.db.view.ViewManager.addView( ~[main/:na]
	at org.apache.cassandra.db.view.ViewManager.reload( ~[main/:na]
	at org.apache.cassandra.schema.Schema.alterKeyspace( ~[main/:na]
	at org.apache.cassandra.schema.Schema.lambda$merge$18( ~[main/:na]
	at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet.lambda$entryConsumer$0(
	at java.util.HashMap$EntrySet.forEach( ~[na:1.8.0_131]
	at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet.forEach(
	at org.apache.cassandra.schema.Schema.merge( ~[main/:na]
	at org.apache.cassandra.schema.Schema.mergeAndAnnounceVersion( ~[main/:na]
	at org.apache.cassandra.schema.MigrationTask$1.response( ~[main/:na]
	at ~[main/:na]
	at ~[main/:na]
	at java.util.concurrent.Executors$ ~[na:1.8.0_131]
	at ~[na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$ [na:1.8.0_131]
	at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(
	at ~[na:1.8.0_131]

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message