Skip to content

Commit 1ee82b3

Browse files
authored
Merge branch 'master' into bitop
2 parents 085c5b8 + 0decfdc commit 1ee82b3

File tree

32 files changed

+846
-107
lines changed

32 files changed

+846
-107
lines changed

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Checkout
99
uses: actions/checkout@v4
1010
- name: Check Spelling
11-
uses: rojopolis/spellcheck-github-actions@0.49.0
11+
uses: rojopolis/spellcheck-github-actions@0.51.0
1212
with:
1313
config_path: .github/spellcheck-settings.yml
1414
task_name: Markdown

RELEASE-NOTES.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Release Notes
22

3+
# 9.11.0 (2025-06-24)
4+
5+
## 🚀 Highlights
6+
7+
Fixes TxPipeline to work correctly in cluster scenarios, allowing execution of commands
8+
only in the same slot.
9+
10+
# Changes
11+
12+
## 🚀 New Features
13+
14+
- Set cluster slot for `scan` commands, rather than random ([#2623](https://github.com/redis/go-redis/pull/2623))
15+
- Add CredentialsProvider field to UniversalOptions ([#2927](https://github.com/redis/go-redis/pull/2927))
16+
- feat(redisotel): add WithCallerEnabled option ([#3415](https://github.com/redis/go-redis/pull/3415))
17+
18+
## 🐛 Bug Fixes
19+
20+
- fix(txpipeline): keyless commands should take the slot of the keyed ([#3411](https://github.com/redis/go-redis/pull/3411))
21+
- fix(loading): cache the loaded flag for slave nodes ([#3410](https://github.com/redis/go-redis/pull/3410))
22+
- fix(txpipeline): should return error on multi/exec on multiple slots ([#3408](https://github.com/redis/go-redis/pull/3408))
23+
- fix: check if the shard exists to avoid returning nil ([#3396](https://github.com/redis/go-redis/pull/3396))
24+
25+
## 🧰 Maintenance
26+
27+
- feat: optimize connection pool waitTurn ([#3412](https://github.com/redis/go-redis/pull/3412))
28+
- chore(ci): update CI redis builds ([#3407](https://github.com/redis/go-redis/pull/3407))
29+
- chore: remove a redundant method from `Ring`, `Client` and `ClusterClient` ([#3401](https://github.com/redis/go-redis/pull/3401))
30+
- test: refactor TestBasicCredentials using table-driven tests ([#3406](https://github.com/redis/go-redis/pull/3406))
31+
- perf: reduce unnecessary memory allocation operations ([#3399](https://github.com/redis/go-redis/pull/3399))
32+
- fix: insert entry during iterating over a map ([#3398](https://github.com/redis/go-redis/pull/3398))
33+
- DOC-5229 probabilistic data type examples ([#3413](https://github.com/redis/go-redis/pull/3413))
34+
- chore(deps): bump rojopolis/spellcheck-github-actions from 0.49.0 to 0.51.0 ([#3414](https://github.com/redis/go-redis/pull/3414))
35+
36+
## Contributors
37+
We'd like to thank all the contributors who worked on this release!
38+
39+
[@andy-stark-redis](https://github.com/andy-stark-redis), [@boekkooi-impossiblecloud](https://github.com/boekkooi-impossiblecloud), [@cxljs](https://github.com/cxljs), [@dcherubini](https://github.com/dcherubini), [@dependabot[bot]](https://github.com/apps/dependabot), [@iamamirsalehi](https://github.com/iamamirsalehi), [@ndyakov](https://github.com/ndyakov), [@pete-woods](https://github.com/pete-woods), [@twz915](https://github.com/twz915) and [dependabot[bot]](https://github.com/apps/dependabot)
40+
341
# 9.10.0 (2025-06-06)
442

543
## 🚀 Highlights

command.go

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,55 @@ import (
1717
"github.com/redis/go-redis/v9/internal/util"
1818
)
1919

20+
// keylessCommands contains Redis commands that have empty key specifications (9th slot empty)
21+
// Only includes core Redis commands, excludes FT.*, ts.*, timeseries.*, search.* and subcommands
22+
var keylessCommands = map[string]struct{}{
23+
"acl": {},
24+
"asking": {},
25+
"auth": {},
26+
"bgrewriteaof": {},
27+
"bgsave": {},
28+
"client": {},
29+
"cluster": {},
30+
"config": {},
31+
"debug": {},
32+
"discard": {},
33+
"echo": {},
34+
"exec": {},
35+
"failover": {},
36+
"function": {},
37+
"hello": {},
38+
"latency": {},
39+
"lolwut": {},
40+
"module": {},
41+
"monitor": {},
42+
"multi": {},
43+
"pfselftest": {},
44+
"ping": {},
45+
"psubscribe": {},
46+
"psync": {},
47+
"publish": {},
48+
"pubsub": {},
49+
"punsubscribe": {},
50+
"quit": {},
51+
"readonly": {},
52+
"readwrite": {},
53+
"replconf": {},
54+
"replicaof": {},
55+
"role": {},
56+
"save": {},
57+
"script": {},
58+
"select": {},
59+
"shutdown": {},
60+
"slaveof": {},
61+
"slowlog": {},
62+
"subscribe": {},
63+
"swapdb": {},
64+
"sync": {},
65+
"unsubscribe": {},
66+
"unwatch": {},
67+
}
68+
2069
type Cmder interface {
2170
// command name.
2271
// e.g. "set k v ex 10" -> "set", "cluster info" -> "cluster".
@@ -75,12 +124,22 @@ func writeCmd(wr *proto.Writer, cmd Cmder) error {
75124
return wr.WriteArgs(cmd.Args())
76125
}
77126

127+
// cmdFirstKeyPos returns the position of the first key in the command's arguments.
128+
// If the command does not have a key, it returns 0.
129+
// TODO: Use the data in CommandInfo to determine the first key position.
78130
func cmdFirstKeyPos(cmd Cmder) int {
79131
if pos := cmd.firstKeyPos(); pos != 0 {
80132
return int(pos)
81133
}
82134

83-
switch cmd.Name() {
135+
name := cmd.Name()
136+
137+
// first check if the command is keyless
138+
if _, ok := keylessCommands[name]; ok {
139+
return 0
140+
}
141+
142+
switch name {
84143
case "eval", "evalsha", "eval_ro", "evalsha_ro":
85144
if cmd.stringArg(2) != "0" {
86145
return 3

0 commit comments

Comments
 (0)