1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-11 18:10:43 +03:00
Commit Graph

2935 Commits

Author SHA1 Message Date
dependabot[bot]
d6c22708e7 chore(deps): bump golangci/golangci-lint-action from 6.5.1 to 6.5.2 (#3317)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.1 to 6.5.2.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.5.1...v6.5.2)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
70880f2592 release 9.7.3, retract 9.7.2 (#3314) (#3315) 2025-08-11 01:42:45 +03:00
dependabot[bot]
cfa9ab9eff chore(deps): bump golang.org/x/net in /example/otel (#3308)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.36.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
a8e0b2637f fix: handle network error on SETINFO (#3295) (CVE-2025-29923)
* fix: handle network error on SETINFO

This fix addresses potential out of order responses as described in `CVE-2025-29923`

* fix: deprecate DisableIndentity and introduce DisableIdentity

Both options will work before V10. In v10 DisableIndentity will be dropped. The preferred flag to use is `DisableIdentity`.
2025-08-11 01:42:45 +03:00
andy-stark-redis
2ff957aeb0 DOC-4494 SADD and SMEMBERS command examples (#3242)
* DOC-4494 added sadd example

* DOC-4494 sadd and smembers examples

* DOC-4494 better naming convention for result variables

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
ofekshenawa
94288e80a4 Add vector types INT8 and UINT8 test (#3299) 2025-08-11 01:42:45 +03:00
b1ackd0t
f1fa67a1a2 fix(tracing): show the whole command rather than truncated version of it (#3290)
Truncate version of a long key might not be useful when debugging

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
cc3b6e71ed chore: use redis 8 ce m05 (#3304)
* use m05

* add platform, since client-libs has image for amd64

* verbose testing

* Update .github/workflows/build.yml
2025-08-11 01:42:45 +03:00
dependabot[bot]
3bb6b763c6 chore(deps): bump golangci/golangci-lint-action from 6.5.0 to 6.5.1 (#3302)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.0 to 6.5.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.5.0...v6.5.1)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 01:42:45 +03:00
Monkey
28d0d08ce4 fix: connection pool timeout, increase retries (#3298)
* fix: connection pool timeout, increase retries

Signed-off-by: monkey <golang@88.com>

* fix: add shouldRetry test

Signed-off-by: monkey <golang@88.com>

---------

Signed-off-by: monkey <golang@88.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
LINKIWI
f3979d7144 Set client name in HELLO RESP handshake (#3294) 2025-08-11 01:42:45 +03:00
ofekshenawa
b6b2d7edbe Enable dialect 2 on default (#3213)
* Enable dialect 2 on deafult

* add vector test for default dialect

* Add dialect 1 test

* Add dialect 1 test & fix ft.search

* Add default dialect to Readme
2025-08-11 01:42:45 +03:00
David Maier
6572f0fad3 Update README.md
Minor update on the README by highlighting that go-redis is the official Redis library. The note about Uptrace was moved to the 'contributors' section of the README.
2025-08-11 01:42:45 +03:00
milad
7f141173f1 add readOnly on failover opts (#3281)
* add readOnly on failover opts

add failover that if is True it connects to slaves

* add test

* add test for slave connect

* fix test

* fix tests

* skip Flaky

* add more tests on slave

* add test

* delete file

* Update universal_test.go

enable previously skipped test.

* rm skip from sentinels

* rm tmp files

* Update universal_test.go

don't run sentinel test in RE

* Update universal_test.go

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Bhargav Dodla
5c5ddc93d9 fix: Fixed issue with context cancelled error leading to connection spikes on Primary instances (#3190)
* fix: Fixed issue with context cancelled error leading to connection spikes on Master

* fix: Added tests

* fix: Updated tests

---------

Co-authored-by: Bhargav Dodla <bdodla@expediagroup.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
d3d98f1e96 fix(test): sort results in example test (#3292) 2025-08-11 01:42:45 +03:00
fengyun.rui
57704a3616 feat: add hstrlen command for hash (#2843)
* feat: add hstrlen command for hash

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

* feat: add hstrlen command for hash

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

---------

Signed-off-by: rfyiamcool <rfyiamcool@163.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
4451928608 feat: Enable CI for Redis CE 8.0 (#3274)
* chore: extract benchmark tests

* wip

* enable pubsub tests

* enable ring tests

* stop tests with build redis from source

* start all tests

* mix of makefile and action

* add sentinel configs

* fix example test

* stop debug on re

* wip

* enable gears for redis 7.2

* wip

* enable sentinel, they are expected to fail

* fix: linter configuration

* chore: update re versions

* return older redis enterprise version

* add basic codeql

* wip: increase timeout, focus only sentinel tests

* sentinels with docker network host

* enable all tests

* fix flanky test

* enable example tests

* tidy docker compose

* add debug output

* stop shutingdown masters

* don't test sentinel for re

* skip unsuported addscores

* Update README

bump go version in CI

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CONTRIBUTING.md

add information about new test setup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-11 01:42:45 +03:00
Flc゛
4d075dd648 fix(redisotel): fix the situation of reporting spans multiple times (#3168)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Rushikesh Joshi
eaaac08f98 feat: support Elasticache cluster mode by introducing IsClusterMode config param (#3255)
Co-authored-by: Rushikesh Joshi <rushikesh.joshi@sap.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Tom Bayes
0a76a3570b Add test codes for search_commands.go (#3285)
* feat: add test codes for search_commands.go

* feat: move ftaggregate tests to search_test.go

* Update search_test.go

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>

* feat: remove reflect from test

* Update search_test.go

fix type in Sprintf

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
0bd9d4a8ee V9.7.1 -> master (#3287) 2025-08-11 01:42:45 +03:00
fengyun.rui
4f9550fd99 fix: race slice for list function of ring client (#2931)
* fix: race slice for list of ring client

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

* fix: copy wrong list

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>

---------

Signed-off-by: rfyiamcool <rfyiamcool@163.com>
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Ali Error
26e2430865 fix: nil pointer dereferencing in writeArg (#3271)
* fixed bug with nil dereferencing in writeArg, added hset struct example, added tests

* removed password from example

* added omitempty

* reverted xxhash versioning

* reverted xxhash versioning

* removed password

* removed password

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
andy-stark-redis
e010f2e2ff DOC-4329 added range query examples (#3252)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
alingse
926d6f1677 move regexp.MustCompile close to call (#3280)
* move regexp.MustCompile out of func

* move moduleRe close to call

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
herodot
1814bae1fd 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>
2025-08-11 01:42:45 +03:00
dependabot[bot]
82be3f4cbe chore(deps): bump rojopolis/spellcheck-github-actions (#3276)
Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.46.0 to 0.47.0.
- [Release notes](https://github.com/rojopolis/spellcheck-github-actions/releases)
- [Changelog](https://github.com/rojopolis/spellcheck-github-actions/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rojopolis/spellcheck-github-actions/compare/0.46.0...0.47.0)

---
updated-dependencies:
- dependency-name: rojopolis/spellcheck-github-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
61391aac2d fix: linter configuration (#3279) 2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
7b400169e3 use limit when limitoffset is zero (#3275) 2025-08-11 01:42:45 +03:00
LINKIWI
18bc8edbcf Reinstate read-only lock on hooks access in dialHook (#3225) 2025-08-11 01:42:45 +03:00
Flc゛
f83f92242b chore(deps): update github.com/cespare/xxhash/v2 to v2.3.0 (#3265)
* chore(deps): update github.com/cespare/xxhash/v2 to v2.3.0

* chore(deps): update github.com/cespare/xxhash/v2 to v2.3.0
2025-08-11 01:42:45 +03:00
Flc゛
9a37279edf test(redisotel): rename redisotel_test.go to tracing_test.go and add tracing hook tests (#3270)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
e59b1856eb test: add test for info in RCE 8 (#3269) 2025-08-11 01:42:45 +03:00
andy-stark-redis
5fdab23102 DOC-4335 added aggregate query examples (#3259)
* DOC-4335 added aggregate query examples (demonstrating errors)

* DOC-4335 remove incomplete examples

* DOC-4335 added missing examples using latest client updates

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
01fd453dd0 fix: flaky ClientKillByFilter test (#3268) 2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
162b52675a 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
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
7816fdda4b 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
2025-08-11 01:42:45 +03:00
dependabot[bot]
e4173a4783 chore(deps): bump rojopolis/spellcheck-github-actions (#3227)
Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.45.0 to 0.46.0.
- [Release notes](https://github.com/rojopolis/spellcheck-github-actions/releases)
- [Changelog](https://github.com/rojopolis/spellcheck-github-actions/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rojopolis/spellcheck-github-actions/compare/0.45.0...0.46.0)

---
updated-dependencies:
- dependency-name: rojopolis/spellcheck-github-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
andy-stark-redis
c42db42f15 DOC-4300 added exact match examples (#3251)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
andy-stark-redis
3c78310e83 DOC-4332 added geo query examples (#3257)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
andy-stark-redis
85bccdcf25 DOC-4331 added full text query examples (#3256)
* DOC-4331 added full text query examples

* DOC-4331 made tests deterministic with sort

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
andy-stark-redis
52672e50af DOC-4799 fixed capped list example (#3260)
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
andy-stark-redis
ed8b629586 DOC-4734 added geo indexing examples (#3240)
* DOC-4734 added geo indexing examples

* DOC-4734 delete keys before starting tests

---------

Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
d4ddfe9c89 feat(command): add ACL commands, validate module categories exist (#3262)
* add ACL{SetUser,DelUser,List} commands

* test presence of categories in acl cat

* code cleanup

* add basic acl tests

* add acl modules tests

* reset acl log before test

* refactor acl tests

* fix clientkillbyage test
2025-08-11 01:42:45 +03:00
Julien Riou
40ed9dc54f feat(options): add skip_verify param (#3216)
* feat(options): Add skip_verify param

When parsing a URL, add a "skip_verify" query param to disable TLS certificate
verification.

Inspired by various Go drivers:

* ClickHouse: https://github.com/ClickHouse/clickhouse-go/blob/v2.30.0/clickhouse_options.go#L259
* MongoDB: https://github.com/mongodb/mongo-go-driver/blob/v2.0.0/x/mongo/driver/connstring/connstring.go#L609
* MySQL: https://github.com/go-sql-driver/mysql/blob/v1.8.1/dsn.go#L175

Signed-off-by: Julien Riou <julien@riou.xyz>

* docs(options): Add skip_verify to ParseURL

Signed-off-by: Julien Riou <julien@riou.xyz>

---------

Signed-off-by: Julien Riou <julien@riou.xyz>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
dependabot[bot]
07548a6d51 chore(deps): bump github.com/cespare/xxhash/v2 from 2.2.0 to 2.3.0 (#2964)
Bumps [github.com/cespare/xxhash/v2](https://github.com/cespare/xxhash) from 2.2.0 to 2.3.0.
- [Commits](https://github.com/cespare/xxhash/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/cespare/xxhash/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
ZhuHaiCheng
b83216f26a chore: fix some comments (#3226)
Signed-off-by: zhuhaicity <zhuhai@52it.net>
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
2025-08-11 01:42:45 +03:00
Nedyalko Dyakov
c0235ccb9d feat(tests): validate that ConfigSet and ConfigGet work with Modules (#3258)
* Add tests for unified config in Redis 8

* WIP: fix reading FT.CONFIG with RESP3

* add more tests

* use search-timeout

* move deprecated warnings on the bottom
2025-08-11 01:42:45 +03:00
Shawn Wang
12b012255e 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>
2025-08-11 01:42:45 +03:00