support rename in cluster

This commit is contained in:
finley
2025-03-23 21:34:54 +08:00
parent 23b70325f9
commit ef4e09972c
5 changed files with 141 additions and 23 deletions

View File

@@ -39,6 +39,11 @@ func (cluster *Cluster) LocalExec(c redis.Connection, cmdLine [][]byte) redis.Re
return cluster.db.Exec(c, cmdLine)
}
// LocalExec executes command at local node
func (cluster *Cluster) LocalExecWithinLock(c redis.Connection, cmdLine [][]byte) redis.Reply {
return cluster.db.ExecWithLock(c, cmdLine)
}
// GetPartitionKey extract hashtag
func GetPartitionKey(key string) string {
beg := strings.Index(key, "{")