mesosphere-backup / dcos-cassandra-service

DEPRECATED—Open source Apache Cassandra running on DC/OS is now replaced by mesosphere/dcos-commons/frameworks/cassandra. This repository will be deleted at the end of 2017.
Apache License 2.0
116 stars 53 forks source link

Backup operation does not support uppercase keyspace names #371

Open SlevinBE opened 7 years ago

SlevinBE commented 7 years ago

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);
verma7 commented 7 years ago

@vargup ^