You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "lukasz-antoniak (via GitHub)" <gi...@apache.org> on 2025/09/05 13:24:32 UTC
Re: [PR] CASSGO-88 Do not set beta protocol flag when using v5 [cassandra-gocql-driver]
lukasz-antoniak commented on code in PR #1906:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1906#discussion_r2325095391
##########
conn.go:
##########
@@ -1317,7 +1317,24 @@ func (c *Conn) execInternal(ctx context.Context, req frameBuilder, tracer Tracer
defer c.releaseStream(call)
if v := resp.framer.header.version.version(); v != c.version {
- return nil, NewErrProtocol("unexpected protocol version in response: got %d expected %d", v, c.version)
+ errProtocol := NewErrProtocol("unexpected protocol version in response: got %d expected %d", v, c.version)
+ responseFrame, err := resp.framer.parseFrame()
+ if err != nil {
+ c.logger.Warning("Framer error while attempting to parse potential protocol error.",
+ newLogFieldError("err", err))
+ return nil, errProtocol
+ }
+ //goland:noinspection GoTypeAssertionOnErrors
+ errFrame, isErrFrame := responseFrame.(errorFrame)
+ if !isErrFrame {
Review Comment:
NIT: How about merging two below conditions together?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org