dcos-cassandra-service
dcos-cassandra-service copied to clipboard
Backup operation does not support uppercase keyspace names
In Cassandra 3.x it is possible to create a keyspace with an uppercase name by enclosing the name in quotes when creating it. Some open source services which run on Cassandra automatically create those keyspaces, such as Blueflood (a timeseries database, with Cassandra as its backend).
Currently it is not possible to create a backup of such a keyspace, because when the Cassandra database contains a keyspace with an uppercase name, the backup operation will crash on the following line: https://github.com/mesosphere/dcos-cassandra-service/blob/1.0.22-3.0.10/cassandra-executor/src/main/java/com/mesosphere/dcos/cassandra/executor/tasks/BackupSchema.java#L92
Reason for this is that on the previous line the following code can't find the keyspace, because no quotes are used on the keyspace to preserve the uppercase nature of the name:
KeyspaceMetadata ksm = cluster.getMetadata().getKeyspace(keyspace);
@vargup ^