You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Bianca Stanciu (Jira)" <ji...@apache.org> on 2026/07/16 07:21:00 UTC

[jira] [Created] (CASSANALYTICS-183) Mixed-case keyspace restore fails with "Keyspace does not exist" when quoteIdentifiers is set

Bianca Stanciu created CASSANALYTICS-183:
--------------------------------------------

             Summary: Mixed-case keyspace restore fails with "Keyspace does not exist" when quoteIdentifiers is set
                 Key: CASSANALYTICS-183
                 URL: https://issues.apache.org/jira/browse/CASSANALYTICS-183
             Project: Apache Cassandra Analytics
          Issue Type: Improvement
          Components: Writer
            Reporter: Bianca Stanciu
            Assignee: Bianca Stanciu


  +_*Problem*_+

  When a Cassandra keyspace or table is created with CQL double-quotes {*}(e.g. CREATE KEYSPACE "MyKeyspace"){*}, the name is case-sensitive and stored as-is internally. The QualifiedTableName class holds the raw name without quote context. All Sidecar REST API calls in *CloudStorageDataTransferApiImpl* and
  *CoordinatedCloudStorageDataTransferApi* were passing the unquoted name (MyKeyspace) in the HTTP request payload.

  On the Sidecar side, that raw name is passed to the DataStax driver's {*}Metadata.getKeyspace(){*}, which case-folds it to {_}*mykeyspace*{_}, a name that does not exist in the cluster. The restore job then fails with:

  *▎ Keyspace does not exist: MyKeyspace*

  +_*Root Cause*_+

  *CloudStorageDataTransferApiImpl* (and its coordinated variant) called *qualifiedTableName.keyspace() / qualifiedTableName.table()* directly when building API requests. These return the raw stored name with no CQL quoting applied, regardless of whether quoteIdentifiers was set by the caller.

  +_*Solution*_+

  Added *maybeQuotedKeyspace()* and *maybeQuotedTable()* convenience methods to {*}QualifiedTableName{*}. These wrap the existing *maybeQuote()* helper and return the name surrounded by CQL double-quotes when {_}*quoteIdentifiers=true*{_}, or the plain name otherwise.

  All restore job API call sites in *CloudStorageDataTransferApiImpl* and *CoordinatedCloudStorageDataTransferApi* will be updated to use these methods:
  - createRestoreJob
  - restoreJobSummary
  - updateRestoreJob
  - abortRestoreJob
  - CreateRestoreJobSliceRequest (both direct and coordinated)
  - RestoreJobProgressRequestParams

 

  *Dependencies*

   This change ensures the correct quoted name is sent in the request; CASSSIDECAR-475 ensures Sidecar resolves it correctly on lookup.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org