[ 
https://issues.apache.org/jira/browse/CASSANDRA-16508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Semb Wever updated CASSANDRA-16508:
-------------------------------------------
          Fix Version/s:     (was: 4.0-rc)
                         4.0
                         4.0-beta5
    Source Control Link: 
https://github.com/apache/cassandra/commit/b60acd5f6feca50491cffa675690dbbdda92685f
             Resolution: Fixed
                 Status: Resolved  (was: Ready to Commit)

Committed as 
[b60acd5f6feca50491cffa675690dbbdda92685f|https://github.com/apache/cassandra/commit/b60acd5f6feca50491cffa675690dbbdda92685f].

> Running cqlsh against cassandra 3 throws error about beta flag not set
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-16508
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16508
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter
>            Reporter: Jeff Widman
>            Assignee: Adam Holmberg
>            Priority: Normal
>             Fix For: 4.0-beta5, 4.0
>
>
> I just ran `cqlsh` from `trunk` commit 
> 2aa22ba99dcc1dacb07b7af31b2664e7db839063 against a Cassandra 3.11.10 docker 
> image.
> I expected that the newer cqlsh would down-negotiate from the v5 protocol to 
> the older v4 protocol.
> Instead, I was surprised to get a server error about a beta protocol being 
> used without `BETA_FLAG` being set. I unfortunately had to reboot my 
> computer, so I lost the traceback but I can easily reproduce if needed.
> I think what's happening is that this commit promoted v5 out of beta:
> https://github.com/apache/cassandra/commit/c9d6c725dd0b4aa5693eb1c6d2221c28e9e99c6e#diff-9e4fe0cfd28004625a8006be8a0bdeab8cbdfb039449fb9501b15e8952577aaaL479
> And then when it tries to contact the older cassandra version, the server 
> complains that it received a request using the v5 protocol without this beta 
> flag being set.
> However, I was expecting that cqlsh would catch the error and down-negotiate 
> to v4. Instead, it simply returns the error with no message about how to 
> solve. As someone relatively new to `cqlsh`, I assumed at first there was no 
> workaround except for downgrading my version of `cqlsh`. After some googling, 
> I stumbled across a stackoverflow pointing toward the `--cqlversion` flag.
> Given that this was the first cqlsh to support python 3, it means that anyone 
> trying to use python 3 for cqlsh against cassandra 3.x will hit this weird 
> error. There is no alternative if you want to use python 3.
> My suggested fix is to catch the error and either prompt the user with 
> something like _Perhaps you want to manually specify a different cql protocol 
> version using the `--cqlversion` flag?_ or simply auto-down negotiate to 
> version 4 (although I understand why auto-down-negotiating may not be the 
> right move).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to