[CASSANALYTICS-183] - Pass quoted identifiers to sidecar API calls for mixed-case keyspace/table restore - #226
bianca-stanciu29 wants to merge 6 commits into
Conversation
… does not exist when quoteIdentifiers is set
| private TokenRangeReplicasResponse getTokenRangesAndReplicaSets() | ||
| { | ||
| CassandraContext context = getCassandraContext(); | ||
| String quotedKeyspace = maybeQuotedIdentifier(bridge(), conf.quoteIdentifiers, conf.keyspace); |
There was a problem hiding this comment.
nit: change name to maybeQuotedKeyspace?
There was a problem hiding this comment.
Done, renamed the local variable to maybeQuotedKeyspace in CassandraClusterInfo.
| } | ||
|
|
||
| @Test | ||
| void testCreateRestoreJobUsesQuotedIdentifiers() throws Exception |
There was a problem hiding this comment.
What do you think about adding quoted identifiers tests to the other modified APIs?
There was a problem hiding this comment.
Done, added tests for quoted identifiers in the direct and coordinated restore-slice requests, coordinated restore-job progress, cluster schema and token-range requests, and dynamic sizing/table-stats calls.
| /** | ||
| * @return the keyspace name, quoted with double quotes when {@code quoteIdentifiers} is set | ||
| */ | ||
| public String maybeQuotedKeyspace() |
There was a problem hiding this comment.
@bbotella @yifan-c @frankgh I think we should keep keyspace() and table() as raw-name accessors. They’re also used for SSTable metadata, local data-layer setup, and job statistics, so returning quoted names would require checking those callers too. The separate maybeQuoted accessors let us apply quoting when building Sidecar requests without changing other uses. CASSSIDECAR-475 fixes the metadata lookup inside Sidecar, but that’s separate from what these analytics accessors return. What do you think?
Rename the conditional keyspace value and verify quoted names in restore, coordinated, topology, and sizing requests.
No description provided.