New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReadTimeout doesn't seem to work #2305
Comments
v6 is too old version, you may consider v8/v9? |
@monkey92t Thanks. I tried using v9, but it made no difference. |
|
@monkey92t Would you please explain it's impact on this issue? |
Sentinel needs to obtain redis-server from sentinel-server to execute commands: client -> cmd -> sentinel -> redis-server -> write cmd to redis-server -> read response from redis-server Sentinel will try to get redis-server from multiple sentinel-servers. This is a redis command. If it fails ( |
Issue tracker is used for reporting bugs and discussing new features. Please use
stackoverflow for supporting issues.
ReadTimeout value used in the FailoverOptions for
redis.NewFailoverClient
to connect to a redis sentinel doesn't seem to have an effect.Expected Behavior
If the read operation is taking more time than the ReadTimeout value, it should return an error.
Current Behavior
ReadTimeout exceeds, but no error is returned.
Possible Solution
Steps to Reproduce
Code to reproduce:
`package main
import (
"fmt"
"github.com/go-redis/redis"
"time"
)
func main() {
master := "mymaster"
SentinelServers := []string{"localhost:26379"}
Password := ""
PoolSize := 9
DB := 11
client := redis.NewFailoverClient(&redis.FailoverOptions{
MasterName: master,
SentinelAddrs: SentinelServers,
Password: Password,
PoolSize: PoolSize,
DB: DB,
ReadTimeout: time.Duration(30) * time.Microsecond,
})
}
`
Context (Environment)
There are occasions where the read operations take up to 10s to complete. Our aim is to unblock such operations by using the ReadTimeout value.
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: