mirror of
https://github.com/fluencelabs/redis
synced 2025-04-08 18:38:04 +00:00
Fix to Cluster test to support @busport format.
This commit is contained in:
parent
cbcffed907
commit
5b7b235367
@ -58,7 +58,8 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
|
|||||||
set idx 0; # Index of the node that will respond.
|
set idx 0; # Index of the node that will respond.
|
||||||
set errmsg {}
|
set errmsg {}
|
||||||
foreach start_node $::redis_cluster::startup_nodes($id) {
|
foreach start_node $::redis_cluster::startup_nodes($id) {
|
||||||
lassign [split $start_node :] start_host start_port
|
set ip_port [lindex [split $start_node @] 0]
|
||||||
|
lassign [split $ip_port :] start_host start_port
|
||||||
if {[catch {
|
if {[catch {
|
||||||
set r {}
|
set r {}
|
||||||
set r [redis $start_host $start_port]
|
set r [redis $start_host $start_port]
|
||||||
@ -68,7 +69,7 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
|
|||||||
if {$r ne {}} {catch {$r close}}
|
if {$r ne {}} {catch {$r close}}
|
||||||
incr idx
|
incr idx
|
||||||
if {[string length $errmsg] < 200} {
|
if {[string length $errmsg] < 200} {
|
||||||
append errmsg " $start_node: $e"
|
append errmsg " $ip_port: $e"
|
||||||
}
|
}
|
||||||
continue ; # Try next.
|
continue ; # Try next.
|
||||||
} else {
|
} else {
|
||||||
@ -98,6 +99,7 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
|
|||||||
set args [split $line " "]
|
set args [split $line " "]
|
||||||
lassign $args nodeid addr flags slaveof pingsent pongrecv configepoch linkstate
|
lassign $args nodeid addr flags slaveof pingsent pongrecv configepoch linkstate
|
||||||
set slots [lrange $args 8 end]
|
set slots [lrange $args 8 end]
|
||||||
|
set addr [lindex [split $addr @] 0]
|
||||||
if {$addr eq {:0}} {
|
if {$addr eq {:0}} {
|
||||||
set addr $start_host:$start_port
|
set addr $start_host:$start_port
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user