mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +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:
@ -75,7 +75,7 @@ func writeCmd(wr *proto.Writer, cmd Cmder) error {
|
||||
return wr.WriteArgs(cmd.Args())
|
||||
}
|
||||
|
||||
func cmdFirstKeyPos(cmd Cmder, info *CommandInfo) int {
|
||||
func cmdFirstKeyPos(cmd Cmder) int {
|
||||
if pos := cmd.firstKeyPos(); pos != 0 {
|
||||
return int(pos)
|
||||
}
|
||||
@ -95,10 +95,6 @@ func cmdFirstKeyPos(cmd Cmder, info *CommandInfo) int {
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
if info != nil {
|
||||
return int(info.FirstKeyPos)
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user