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

Commits on May 14, 2024

  1. Fix tests

    sylwiaszunejko committed May 14, 2024
    Configuration menu
    Copy the full SHA
    3c28b6a View commit details
    Browse the repository at this point in the history
  2. cqlsh: try server-side DESCRIBE, then client-side

    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
    avelanarius authored and sylwiaszunejko committed May 14, 2024
    Configuration menu
    Copy the full SHA
    7c9e942 View commit details
    Browse the repository at this point in the history