1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-05 20:24:00 +03:00
Commit Graph

20 Commits

Author SHA1 Message Date
fukua95
81bd24deb0 chore: remove unused param (#3382)
* chore: remove unused param

Signed-off-by: fukua95 <fukua95@gmail.com>

* chore: rename a unused param to `_`

Signed-off-by: fukua95 <fukua95@gmail.com>

---------

Signed-off-by: fukua95 <fukua95@gmail.com>
2025-08-11 01:42:55 +03:00
Nedyalko Dyakov
64390f210e feat(options): panic when options are nil (#3363)
Client creation should panic when options are nil.
2025-08-11 01:42:55 +03:00
ofekshenawa
55758375fc migrate golangci-lint config to v2 format (#3354)
* migrate golangci-lint config to v2 format

* chore: skip CI on migration [skip ci]

* Bump golangci version

* Address several golangci-lint/staticcheck warnings

* change staticchecks settings
2025-08-11 01:42:55 +03:00
Bulat Khasanov
1284ebd6d1 Use correct slot for COUNTKEYSINSLOT command (#3327) 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
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
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
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
Justin
7cf9f53eb2 Only check latencies once every 10 seconds with routeByLatency (#2795)
* Only check latencies once every 10 seconds with `routeByLatency`

`routeByLatency` currently checks latencies any time a server returns
a MOVED or READONLY reply. When a shard is down, the ClusterClient
chooses to issue the request to a random server, which returns a MOVED
reply. This causes a state refresh and a latency update on all servers.
This can lead to significant ping load to clusters with a large number
of clients.

This introduces logic to ping only once every 10 seconds, only
performing a latency update on a node during the `GC` function if the
latency was set later than 10 seconds ago.

Fixes https://github.com/redis/go-redis/issues/2782

* use UnixNano instead of Unix for better precision

---------

Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
2025-08-11 01:42:44 +03:00
LINKIWI
eb4d5f0bd9 Avoid unnecessary retry delay following MOVED and ASK redirection (#3048) 2025-08-11 01:39:45 +03:00
Srikar Jilugu
f5a789a846 fix node routing in slotClosestNode (#3043)
* fix node routing when all nodes are failing

* fix minlatency zero value
2025-08-11 01:39:45 +03:00
Monkey
bfea813687 fix: fix #2681 (#2998)
Signed-off-by: monkey92t <golang@88.com>
2025-08-11 01:39:45 +03:00
高木同学
f7f34feddf Optimize docs useless imports and typo (#2970) 2024-04-14 22:59:09 +08:00
kindknow
6960bcc08d chore: fix some comments (#2967)
Signed-off-by: kindknow <iturf@sina.com>
Co-authored-by: Monkey <golang@88.com>
2024-04-14 01:15:23 +08:00
singular-seal
f5496d14dd Fix for issues #2959 and #2960 (#2961)
Co-authored-by: Hu Ying <ying.hu@shopee.com>
2024-04-12 23:10:12 +08:00
John Du Hart
516abe867d add CredentialsProvider to ClusterOptions (#2791) 2024-02-14 23:03:18 +02:00
ofekshenawa
a32be3d93d Add Suffix support to default client set info (#2852)
* Add Suffix support to defualt client set info

* Change ClientNameSuffix to IdentitySuffix

* add tests
2024-01-04 14:40:14 +02:00
ofekshenawa
86c68be278 Execute "COMMAND" command only when readonly (#2815)
* remove command command from oss cluster

* remove command command from oss cluster

* remove cmdInfo from ring

---------

Co-authored-by: Chayim <chayim@users.noreply.github.com>
2023-12-17 15:21:01 +02:00
chenjie199234
fd13da4fea fix missing fields in different Options (#2757)
* fix missing fields in different Options

* fix missing fields in different Options

---------

Co-authored-by: chenjie199234 <chenjie199234@gmail.com>
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
2023-10-30 14:35:51 +02:00
Chayim
6199a2af2c Making command structs digestable (#2716)
* intial move

* adding stringcmdable

* moving module commands to align with other changes

---------

Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
Co-authored-by: ofekshenawa <ofek.shenawa@redis.com>
2023-09-20 16:08:24 +03:00