1
0
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:
ofekshenawa
2023-12-17 15:21:01 +02:00
committed by GitHub
parent 8c695488a2
commit 86c68be278
4 changed files with 11 additions and 36 deletions

View File

@ -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
}