[
https://issues.apache.org/jira/browse/CASSANDRA-4416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468242#comment-13468242
]
Aleksey Yeschenko commented on CASSANDRA-4416:
----------------------------------------------
This patch causes Cassandra to not start if there is at least one keyspace
besides the system ones.
Run create keyspace test with replication = {'class':'SimpleStrategy',
'replication_factor':1}; from cqlsh, stop cassandra, start cassandra, and
you'll observe the following stacktrace:
java.lang.RuntimeException: Attempting to load already loaded column family
system.batchlog
at org.apache.cassandra.config.Schema.load(Schema.java:396)
at org.apache.cassandra.config.Schema.load(Schema.java:112)
at org.apache.cassandra.config.Schema.load(Schema.java:97)
at
org.apache.cassandra.config.DatabaseDescriptor.loadSchemas(DatabaseDescriptor.java:564)
at
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:214)
at
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:393)
at
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:436)
Exception encountered during startup: Attempting to load already loaded column
family system.batchlog
In fact you don't even need to create a new keyspace - just start/stop
cassandra a couple times.
> Include metadata for system keyspace itself in schema_* tables
> --------------------------------------------------------------
>
> Key: CASSANDRA-4416
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4416
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.2.0 beta 1
> Reporter: paul cannon
> Assignee: Jonathan Ellis
> Priority: Minor
> Labels: cql, cql3
> Fix For: 1.2.0 beta 2
>
> Attachments: 4416.txt
>
>
> The `system.schema_keyspaces`, `system.schema_columnfamilies`, and
> `system.schema_columns` virtual tables allow clients to query schema and
> layout information through CQL. This will be invaluable when users start to
> make more use of the CQL-only protocol (CASSANDRA-2478), since there will be
> no other way to determine certain information about available columnfamilies,
> keyspaces, or show metadata about them.
> However, the system keyspace itself, and all the columnfamilies in it, are
> not represented in the schema_* tables:
> {noformat}
> cqlsh> select * from system.schema_keyspaces where "keyspace" = 'system';
> cqlsh>
> cqlsh> select * from system.schema_columnfamilies where "keyspace" = 'system';
> cqlsh>
> cqlsh> select * from system.schema_columns where "keyspace" = 'system';
> cqlsh>
> {noformat}
> It would be greatly helpful to clients which do more introspection than the
> minimum (say, for example, cqlsh) to be able to get information on the
> structure and availability of schema-definition tables.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira