Skip to content

Commit

Permalink
Use newFramerWithExts instead of newFramer to utilize protocol extens…
Browse files Browse the repository at this point in the history
…ions

In order to utilize cql protocol extensions, we need to use
`newFramerWithExts` instead of `newFramer`.

Previously, during the upstream merging the code using `newFramer`
was added (https://github.com/scylladb/gocql/pull/)109. That way,
the `flagLWT` field was set to `0` by default, causing the driver
to consider every query executed as a LWT query.

The issue was not immediately noticed because the only difference
in behavior occurs when we want to use `ShuffleReplicas()` in
`TokenAwareHostPolicy`.

This commit fixes that.
  • Loading branch information
sylwiaszunejko committed May 9, 2024
1 parent ab5ed47 commit fee3bb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ func (c *Conn) recv(ctx context.Context) error {
panic(fmt.Sprintf("call has incorrect streamID: got %d expected %d", call.streamID, head.stream))
}

framer := newFramer(c.compressor, c.version)
framer := newFramerWithExts(c.compressor, c.version, c.cqlProtoExts)

err = framer.readFrame(c, &head)
if err != nil {
Expand Down

0 comments on commit fee3bb2

Please sign in to comment.