cql-proxy
cql-proxy copied to clipboard
Handle mixed protocol versions e.g. client = V5, server = V4
The protocol version supported by the proxy shouldn't have to match the protocol version of the cluster. This could enable legacy applications. It could be fairly expensive to re-encode queries, so using the same protocol version should be preferred.
Currently the proxy fails to connect with:
{"level":"error","ts":1636406235.5825562,"caller":"proxy/proxy.go:279","msg":"unable to decode frame","error":"cannot decode frame header: expected USE_BETA flag to be set for protocol version ProtocolVersion OSS 5 (beta)","stacktrace":"cql-proxy/proxy.(*client).Receive\n\t/go/src/cql-proxy/proxy/proxy.go:279\ncql-proxy/proxycore.(*Conn).read\n\t/go/src/cql-proxy/proxycore/conn.go:112"}
When using the default settings from the python driver.
Shouldn't it negotiate down to v4?
The lib the proxy was using didn't support this, but has since been fixed: https://github.com/datastax/go-cassandra-native-protocol/pull/26
I'll upgrade and push a new release.