[
https://issues.apache.org/jira/browse/CASSANDRA-16652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17339517#comment-17339517
]
Benjamin Lerer commented on CASSANDRA-16652:
--------------------------------------------
Effectively {{DESCRIBE}}|{{DESC}} will not work properly because in 4.0 we
moved to server side DESCRIBE (CASSANDRA-14825) which do not exist in 3.11.
If we want to support that scenario we need to provide a fallback mechanism in
cqlsh. That basically mean re-introducing the cqlsh code that was removed in
CASSANDRA-14825.
For the record, I am not fully sure that the output will be exactly the same
and our current tests will not test that path (as they run only against the
current version)
so we will need to introduce some upgrade tests that actually test the query
that we test in {{DescribeStatementTest}}.
The other option is to not support that feature and warn the user in the
upgrade section of the NEWS.txt.
I am probably not the best one to judge of how critical is this feature.
[~clohfink], [~jolynch] as you are involved in managing big production
clusters, I would like to hear you opinion about that ticket.
> "desc" on cqlsh 6.0.0 not working with a Cassandra 3.x server
> -------------------------------------------------------------
>
> Key: CASSANDRA-16652
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16652
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Interpreter
> Reporter: Bowen Song
> Assignee: Ekaterina Dimitrova
> Priority: Normal
> Fix For: 4.0-rc2
>
>
> The "desc" statement on cqlsh 6.0.0 shipped with Cassandra 4.0 RC1 is not
> working correctly when it's connected to a Cassandra 3.x server.
> Steps to reproduce:
> * Ensure you have docker installed and running
> * Run the following docker commands to create and start a Cassandra 3.11
> container
> {code:java}
> ~ $ docker create --name cassandra3 cassandra:3.11.10
> 5d903e48e0661e39080198de5e8752356a5a666132211a500ea38af0fc2a0356
> ~ $ docker start cassandra3
> cassandra3
> ~ $ docker exec -ti cassandra3 bash
> {code}
> * Inside the docker container, try the default cqlsh version, make sure
> everything is working correctly
> {code:java}
> root@5d903e48e066:/# cqlsh
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 3.11.10 | CQL spec 3.4.4 | Native protocol v4]
> Use HELP for help.
> cqlsh> desc keyspaces;
> system_traces system_schema system_auth system system_distributed
> cqlsh> use system_auth;
> cqlsh:system_auth> desc tables;
> resource_role_permissons_index role_permissions role_members roles
> cqlsh:system_auth> select * from roles;
> role | can_login | is_superuser | member_of | salted_hash
> -----------+-----------+--------------+-----------+--------------------------------------------------------------
> cassandra | True | True | null |
> $2a$10$8UNyioBF41/OZfcCa2aqXOHvXiNXArBHKaUUhMyPAFKpfN8byXonm
> (1 rows)
> cqlsh:system_auth> exit
> {code}
> * Okay, everything worked as expected. Now install {{git}} to clone the
> Cassandra 4.0 RC1 source code, and {{python3-six}}, which is a dependency of
> cqlsh
> {code:java}
> root@5d903e48e066:/# apt-get update -qq && apt-get install -qq git python3-six
> ...... [truncated]
> {code}
> * Clone the Cassandra repository and checkout the cassandra-4.0-rc1 tag
> {code:java}
> root@5d903e48e066:/# git clone -b cassandra-4.0-rc1 --depth 1
> https://github.com/apache/cassandra.git cassandra-4.0-rc1
> Cloning into 'cassandra-4.0-rc1'...
> ...... [truncated]
> {code}
> * Run the cqlsh from the Git repository, and then repeat all the cqlsh
> statements above
> {code:java}
> root@5d903e48e066:/# cd cassandra-4.0-rc1/bin
> root@5d903e48e066:/cassandra-4.0-rc1/bin# ./cqlsh
> Connected to Test Cluster at 127.0.0.1:9042
> [cqlsh 6.0.0 | Cassandra 3.11.10 | CQL spec 3.4.4 | Native protocol v4]
> Use HELP for help.
> cqlsh> desc keyspaces;
> cqlsh> use system_auth;
> cqlsh:system_auth> desc tables;
> cqlsh:system_auth> select * from roles;
> role | can_login | is_superuser | member_of | salted_hash
> -----------+-----------+--------------+-----------+--------------------------------------------------------------
> cassandra | True | True | null |
> $2a$10$8UNyioBF41/OZfcCa2aqXOHvXiNXArBHKaUUhMyPAFKpfN8byXonm
> (1 rows)
> cqlsh:system_auth> exit
> root@5d903e48e066:/cassandra-4.0-rc1/bin#
> {code}
> "desc" did not work correctly, but "use" and "select" worked.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]