Skip to content

Commit 3d041a1

Browse files
ndyakovofekshenawaLINKIWICgol9Christopher Golling
authored
release: 9.7.1 patch (#3278)
* Add guidance on unstable RESP3 support for RediSearch commands to README (#3177) * Add UnstableResp3 to docs * Add RawVal and RawResult to wordlist * Explain more about SetVal * Add UnstableResp to wordlist * Eliminate redundant dial mutex causing unbounded connection queue contention (#3088) * Eliminate redundant dial mutex causing unbounded connection queue contention * Dialer connection timeouts unit test --------- Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> * SortByWithCount FTSearchOptions fix (#3201) * SortByWithCount FTSearchOptions fix * FTSearch test fix * Another FTSearch test fix * Another FTSearch test fix --------- Co-authored-by: Christopher Golling <Chris.Golling@aexp.com> * Fix race condition in clusterNodes.Addrs() (#3219) Resolve a race condition in the clusterNodes.Addrs() method. Previously, the method returned a reference to a string slice, creating the potential for concurrent reads by the caller while the slice was being modified by the garbage collection process. Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com> * chore: fix some comments (#3226) Signed-off-by: zhuhaicity <zhuhai@52it.net> Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com> * fix(aggregate, search): ft.aggregate bugfixes (#3263) * fix: rearange args for ft.aggregate apply should be before any groupby or sortby * improve test * wip: add scorer and addscores * enable all tests * fix ftsearch with count test * make linter happy * Addscores is available in later redisearch releases. For safety state it is available in redis ce 8 * load an apply seem to break scorer and addscores * fix: add unstableresp3 to cluster client (#3266) * fix: add unstableresp3 to cluster client * propagate unstableresp3 * proper test that will ignore error, but fail if client panics * add separate test for clusterclient constructor * fix: flaky ClientKillByFilter test (#3268) * Reinstate read-only lock on hooks access in dialHook (#3225) * use limit when limitoffset is zero (#3275) * remove redis 8 comments * update package versions * use latest golangci-lint * fix(search&aggregate):fix error overwrite and typo #3220 (#3224) * fix (#3220) * LOAD has NO AS param(https://redis.io/docs/latest/commands/ft.aggregate/) * fix typo: WITHCOUT -> WITHCOUNT * fix (#3220): * Compatible with known RediSearch issue in test * fix (#3220) * fixed the calculation bug of the count of load params * test should not include special condition * return errors when they occur --------- Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com> Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> * Recognize byte slice for key argument in cluster client hash slot computation (#3049) Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com> Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> --------- Signed-off-by: zhuhaicity <zhuhai@52it.net> Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> Co-authored-by: LINKIWI <LINKIWI@users.noreply.github.com> Co-authored-by: Cgol9 <chris.golling@verizon.net> Co-authored-by: Christopher Golling <Chris.Golling@aexp.com> Co-authored-by: Shawn Wang <62313353+shawnwgit@users.noreply.github.com> Co-authored-by: ZhuHaiCheng <zhuhai@52it.net> Co-authored-by: herodot <54836727+bitsark@users.noreply.github.com> Co-authored-by: Vladyslav Vildanov <117659936+vladvildanov@users.noreply.github.com>
1 parent ed37c33 commit 3d041a1

File tree

27 files changed

+365
-72
lines changed

27 files changed

+365
-72
lines changed

.github/wordlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ stunnel
5454
SynDump
5555
TCP
5656
TLS
57+
UnstableResp
5758
uri
5859
URI
5960
url
@@ -62,3 +63,5 @@ RedisStack
6263
RedisGears
6364
RedisTimeseries
6465
RediSearch
66+
RawResult
67+
RawVal

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ on:
1212

1313
permissions:
1414
contents: read
15+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
1516

1617
jobs:
1718
golangci:
18-
permissions:
19-
contents: read # for actions/checkout to fetch code
20-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
2119
name: lint
2220
runs-on: ubuntu-latest
2321
steps:
2422
- uses: actions/checkout@v4
2523
- name: golangci-lint
26-
uses: golangci/golangci-lint-action@v6
24+
uses: golangci/golangci-lint-action@v6.5.0

.golangci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
run:
2-
concurrency: 8
3-
deadline: 5m
2+
timeout: 5m
43
tests: false

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ rdb := redis.NewClient(&redis.Options{
186186
#### Unstable RESP3 Structures for RediSearch Commands
187187
When integrating Redis with application functionalities using RESP3, it's important to note that some response structures aren't final yet. This is especially true for more complex structures like search and query results. We recommend using RESP2 when using the search and query capabilities, but we plan to stabilize the RESP3-based API-s in the coming versions. You can find more guidance in the upcoming release notes.
188188

189+
To enable unstable RESP3, set the option in your client configuration:
190+
191+
```go
192+
redis.NewClient(&redis.Options{
193+
UnstableResp3: true,
194+
})
195+
```
196+
**Note:** When UnstableResp3 mode is enabled, it's necessary to use RawResult() and RawVal() to retrieve a raw data.
197+
Since, raw response is the only option for unstable search commands Val() and Result() calls wouldn't have any affect on them:
198+
199+
```go
200+
res1, err := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawResult()
201+
val1 := client.FTSearchWithArgs(ctx, "txt", "foo bar", &redis.FTSearchOptions{}).RawVal()
202+
```
203+
189204
## Contributing
190205

191206
Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library!

command.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ func (cmd *baseCmd) stringArg(pos int) string {
167167
switch v := arg.(type) {
168168
case string:
169169
return v
170+
case []byte:
171+
return string(v)
170172
default:
171173
// TODO: consider using appendArg
172174
return fmt.Sprint(v)

commands_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ var _ = Describe("Commands", func() {
217217

218218
killed := client.ClientKillByFilter(ctx, "MAXAGE", "1")
219219
Expect(killed.Err()).NotTo(HaveOccurred())
220-
Expect(killed.Val()).To(SatisfyAny(Equal(int64(2)), Equal(int64(3))))
220+
Expect(killed.Val()).To(BeNumerically(">=", 2))
221221

222222
select {
223223
case <-done:

example/del-keys-without-ttl/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.18
55
replace github.com/redis/go-redis/v9 => ../..
66

77
require (
8-
github.com/redis/go-redis/v9 v9.7.0
8+
github.com/redis/go-redis/v9 v9.7.1
99
go.uber.org/zap v1.24.0
1010
)
1111

example/hll/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
replace github.com/redis/go-redis/v9 => ../..
66

7-
require github.com/redis/go-redis/v9 v9.7.0
7+
require github.com/redis/go-redis/v9 v9.7.1
88

99
require (
1010
github.com/cespare/xxhash/v2 v2.2.0 // indirect

example/lua-scripting/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
replace github.com/redis/go-redis/v9 => ../..
66

7-
require github.com/redis/go-redis/v9 v9.7.0
7+
require github.com/redis/go-redis/v9 v9.7.1
88

99
require (
1010
github.com/cespare/xxhash/v2 v2.2.0 // indirect

example/otel/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ replace github.com/redis/go-redis/extra/redisotel/v9 => ../../extra/redisotel
99
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../../extra/rediscmd
1010

1111
require (
12-
github.com/redis/go-redis/extra/redisotel/v9 v9.7.0
13-
github.com/redis/go-redis/v9 v9.7.0
12+
github.com/redis/go-redis/extra/redisotel/v9 v9.7.1
13+
github.com/redis/go-redis/v9 v9.7.1
1414
github.com/uptrace/uptrace-go v1.21.0
1515
go.opentelemetry.io/otel v1.22.0
1616
)
@@ -23,7 +23,7 @@ require (
2323
github.com/go-logr/stdr v1.2.2 // indirect
2424
github.com/golang/protobuf v1.5.3 // indirect
2525
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
26-
github.com/redis/go-redis/extra/rediscmd/v9 v9.7.0 // indirect
26+
github.com/redis/go-redis/extra/rediscmd/v9 v9.7.1 // indirect
2727
go.opentelemetry.io/contrib/instrumentation/runtime v0.46.1 // indirect
2828
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 // indirect
2929
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect

0 commit comments

Comments
 (0)