forked from mirror/redis
commit
eca5d02f24
|
@ -235,6 +235,7 @@ func (c *ClusterClient) slotClosestNode(slot int) (*clusterNode, error) {
|
||||||
func (c *ClusterClient) cmdSlotAndNode(cmd Cmder) (int, *clusterNode, error) {
|
func (c *ClusterClient) cmdSlotAndNode(cmd Cmder) (int, *clusterNode, error) {
|
||||||
cmdInfo := c.cmdInfo(cmd.arg(0))
|
cmdInfo := c.cmdInfo(cmd.arg(0))
|
||||||
if cmdInfo == nil {
|
if cmdInfo == nil {
|
||||||
|
internal.Logf("info for cmd=%s not found", cmd.arg(0))
|
||||||
node, err := c.randomNode()
|
node, err := c.randomNode()
|
||||||
return 0, node, err
|
return 0, node, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,7 +550,7 @@ func (c *cmdable) Set(key string, value interface{}, expiration time.Duration) *
|
||||||
|
|
||||||
func (c *cmdable) SetBit(key string, offset int64, value int) *IntCmd {
|
func (c *cmdable) SetBit(key string, offset int64, value int) *IntCmd {
|
||||||
cmd := NewIntCmd(
|
cmd := NewIntCmd(
|
||||||
"SETBIT",
|
"setbit",
|
||||||
key,
|
key,
|
||||||
offset,
|
offset,
|
||||||
value,
|
value,
|
||||||
|
|
1
ring.go
1
ring.go
|
@ -169,6 +169,7 @@ func (c *Ring) cmdInfo(name string) *CommandInfo {
|
||||||
func (c *Ring) cmdFirstKey(cmd Cmder) string {
|
func (c *Ring) cmdFirstKey(cmd Cmder) string {
|
||||||
cmdInfo := c.cmdInfo(cmd.arg(0))
|
cmdInfo := c.cmdInfo(cmd.arg(0))
|
||||||
if cmdInfo == nil {
|
if cmdInfo == nil {
|
||||||
|
internal.Logf("info for cmd=%s not found", cmd.arg(0))
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return cmd.arg(int(cmdInfo.FirstKeyPos))
|
return cmd.arg(int(cmdInfo.FirstKeyPos))
|
||||||
|
|
Loading…
Reference in New Issue