mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
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>
This commit is contained in:
@ -59,14 +59,6 @@ func NewClusterClientStub(resp []byte) *ClientStub {
|
||||
},
|
||||
})
|
||||
|
||||
// init command.
|
||||
tmpClient := NewClient(&Options{Addr: ":6379"})
|
||||
cmdsInfo, err := tmpClient.Command(ctx).Result()
|
||||
_ = tmpClient.Close()
|
||||
client.cmdsInfoCache = newCmdsInfoCache(func(_ context.Context) (map[string]*CommandInfo, error) {
|
||||
return cmdsInfo, err
|
||||
})
|
||||
|
||||
stub.Cmdable = client
|
||||
return stub
|
||||
}
|
||||
|
Reference in New Issue
Block a user