Skip to content

Commit

Permalink
fix(scyllaclient): don't query raft read barrier API on Scylla 2024.2
Browse files Browse the repository at this point in the history
It turns out that Scylla 2024.2 does not expose this API.
For now, it's not know which enterprise release will contain it,
so we need to fall back to the CQL workaround.

Fixes #4183
  • Loading branch information
Michal-Leszczynski committed Dec 20, 2024
1 parent a16e511 commit 231670d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/scyllaclient/client_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (ni *NodeInfo) SupportsSafeDescribeSchemaWithInternals() (SafeDescribeMetho

for _, fv := range []featureByVersion{
{Constraint: ">= 6.1, < 2000", Method: SafeDescribeMethodReadBarrierAPI},
{Constraint: ">= 2024.2, > 1000", Method: SafeDescribeMethodReadBarrierAPI},
{Constraint: ">= 2024.2, > 1000", Method: SafeDescribeMethodReadBarrierCQL},
{Constraint: ">= 6.0, < 2000", Method: SafeDescribeMethodReadBarrierCQL},
} {
supports, err := scyllaversion.CheckConstraint(ni.ScyllaVersion, fv.Constraint)
Expand Down
4 changes: 2 additions & 2 deletions pkg/scyllaclient/client_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ func TestSupportsSafeDescribeSchemaWithInternals(t *testing.T) {
expectedError: nil,
},
{
name: "when scylla >= 2024.2, then it is expected to support read barrier api",
name: "when scylla >= 2024.2, then it is expected to support read barrier cql",
scyllaVersion: "2024.2",
expectedMethod: scyllaclient.SafeDescribeMethodReadBarrierAPI,
expectedMethod: scyllaclient.SafeDescribeMethodReadBarrierCQL,
expectedError: nil,
},
{
Expand Down

0 comments on commit 231670d

Please sign in to comment.