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

When LWT optimization was implemented in gocql
(#49), all `newFramer`
calls were replaced with `newFramerWithExts` calls.

Previously, during the upstream merging the code using `newFramer`
was added (#109) and it was
forgotten to replace it with `newFramerWithExts`. 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 the issue by replacing `newFramer` with `newFramerWithExts`.
  • Loading branch information
sylwiaszunejko committed May 10, 2024
1 parent ab5ed47 commit e9f8eab
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 e9f8eab

Please sign in to comment.