Redis V7 when reading slots
gipeshka opened this issue · comments
Hey guys, I hope this repo is not completely dead.
Here's an issue I've faced when trying the lib with Redis 7 (AWS managed if it matters).
While running the app I've spotted a lot of MOVED
responses being detected by scredis. Digging a bit deeper I noted the nice bullet point in Redis doc:
Starting with Redis version 7.0.0: Added additional networking metadata field.
Well, this little metadata-array appended to the data breaks reading master node configuration. In the code I've spotted skipping the extra indexes in the array for replicas, but for master node it is not applied. So reading a response like:
*2
*4
:0
:8191
*4
$14
12.123.123.123
:6379
$40
d5ff7bef54dd479458b5297edb6869e471a6cdef
*2
$8
hostname
$0
*4
$14
21.213.213.213
:6379
$40
27b402faa19a1d3f618f9a1b7ef58fef4124ddef
*2
$8
hostname
$0
*4
:8192
:16383
*4
$14
23.231.231.231
:6379
$40
9fb299bbffbd2896edef2322ab3faf1451107d4c
*2
$8
hostname
$0
*4
$14
15.123.123.123
:6379
$40
468e2ccef99fddef945e0dbc90ecd048666b6cfc
*2
$8
hostname
$0
fails and the topology is not applied then.
I was wondering if the change could be applied and a new release of the lib could potentially be issued?