-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Issue tracker is used for reporting bugs and discussing new features. Please use
stackoverflow for supporting issues.
During a library upgrade, we noticed that certain code paths using a TxPipeline started failing with CROSSSLOT errors. While this is expected for some of our usage, it was unexpected for txs that only set one key followed by a wait.
We confirmed this error manifests as part of the changes introduced in v9.11.0. But it seems like the Wait command was not included in the keyless command fix introduced in #3411
Expected Behavior
The txpipeline should complete successfully when all commands map to the same slot and a wait is used.
Current Behavior
The call fails with a CROSSSLOTS error
Possible Solution
Add Wait to the keylessCommands set
Line 22 in 1bb9e0d
| var keylessCommands = map[string]struct{}{ |
Steps to Reproduce
_, err := client.TxPipelined(ctx, func(pipe redis.Pipeliner) error {
p := pipe.(*redis.Pipeline)
p.Set(ctx, "my-key", "my-value", 100*time.Second)
p.Wait(ctx, 2, 2*time.Second)
return nil
})
println(err)Context (Environment)
go-redis/v9.17.0
Go 1.25.1