p5-RedisDB / RedisDB

Perl extension to access Redis
22 stars 11 forks source link

Fix failure to parse CLUSTER NODES after Redis v4 #33

Closed k-asm closed 4 years ago

k-asm commented 4 years ago

Redis v4 and later, the output of CLUSTER NODES changed to the below style (cluster-bus-port was added), so _parse_cluster_nodes failed to parse the addr column.

64efdda59b24c32f47600f102db575bb6b1d07f1 172.21.0.5:6380@16380 master - 0 1573454998851 2 connected 5461-10922
4afb93978bddcda15f7df72e77ce0f533c228af8 172.21.0.5:6381@16381 master - 0 1573454999858 3 connected 10923-16383
298420d2cddeb8cd2b3f0b45414fc405c8894fb8 172.21.0.5:6379@16379 myself,master - 0 1573454996000 1 connected 0-5460

reference: https://github.com/antirez/redis/issues/2527

trinitum commented 4 years ago

@k-asm looks good to me, but can you just rename t/_parse_cluster_nodes.t as t/parse_cluster_nodes.t? I'll merge and upload the new version tonight (now it is morning where I am, so approx in 12 hours), can't do it from work

k-asm commented 4 years ago

Thank you for your quick response.