Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server side describe #2

Merged
merged 2 commits into from
May 15, 2024
Merged

Server side describe #2

merged 2 commits into from
May 15, 2024

Conversation

sylwiaszunejko
Copy link
Owner

No description provided.

sylwiaszunejko and others added 2 commits May 14, 2024 13:49
Since Scylla 5.2 (scylladb/scylladb@e6ffc22)
a support for server-side DESCRIBE was added. However, cqlsh did not
start to use this functionality, since it is only enabled if it detects
CQL version at least 4. Scylla did not increase this version number as
it doesn't support all of its features, so there is a need for a 
different detection mechanism for server-side DESCRIBE.

This commit changes the behavior in do_describe: cqlsh will first try
to execute the server-side DESCRIBE. If this fails with SyntaxException,
meaning that Scylla doesn't support that command, cqlsh falls back to
the client-side DESCRIBE behavior.

The other possible solutions were rejected:
- Based on Scylla version: would require ugly hard-coding of versions
- Modifying Scylla to provide some indication that this feature is 
  enabled: Scylla 5.2 is already released without it, by implementing
  it in another way, we'll get it out sooner
- Do a trial "DESCRIBE" at the start of connection to detect if the
  server supports it: if cqlsh ever supported connecting to multiple
  nodes (right now it uses WhiteListRoundRobinPolicy) we would have
  to do the check on all of the nodes in case a rolling upgrade is
  currently occurring and some of the nodes don't support server-side
  DESCRIBE.

The change was tested manually on a couple of last Scylla OSS, Scylla
Enterprise and Cassandra releases.

Fixes scylladb#17
@sylwiaszunejko sylwiaszunejko merged commit ec14db5 into master May 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants