I've noticed a significant difference between the behaviour of this library when making parallel redis calls using a single client. Perhaps that's a sign I simply shouldn't be doing that, but I suspect it's more to do with changes to the way such calls are handled in redis 3 and the client falling behind.
Where _switchConfig does a redis GET using the redisClient it's given (paraphrased from my "flippy" project: https://www.github.com/giftig/flippy). I'm using this to grab a load of JSON objects from a batch of redis keys and send the objects back to the client. When I test it against redis 2.8.11, it works fine, every time, but when using 3.2.0 I get a garbled response which seems to be the result of getting two results spliced into each other, which the library then seems to misinterpret as a cursor value and breaks pretty badly. Here's what a good and bad request to my service looks like:
I've used redis fairly extensively in the past, and I'm fairly sure it's meant to be ok to do async calls with a single connection like this, which is reinforced by the fact that it's working fine with this library in 2.8, so I suspect this is a bug in the library; I haven't found any documentation indicating recommendations around this have changed in redis 3, either.
I've worked around this problem by using a new redis connection for each command, to ensure it works with 3.x
I've noticed a significant difference between the behaviour of this library when making parallel redis calls using a single client. Perhaps that's a sign I simply shouldn't be doing that, but I suspect it's more to do with changes to the way such calls are handled in redis 3 and the client falling behind.
I'm doing parallel calls a bit like this:
Where
_switchConfig
does a redis GET using theredisClient
it's given (paraphrased from my "flippy" project: https://www.github.com/giftig/flippy). I'm using this to grab a load of JSON objects from a batch of redis keys and send the objects back to the client. When I test it against redis 2.8.11, it works fine, every time, but when using 3.2.0 I get a garbled response which seems to be the result of getting two results spliced into each other, which the library then seems to misinterpret as a cursor value and breaks pretty badly. Here's what a good and bad request to my service looks like:I've used redis fairly extensively in the past, and I'm fairly sure it's meant to be ok to do async calls with a single connection like this, which is reinforced by the fact that it's working fine with this library in 2.8, so I suspect this is a bug in the library; I haven't found any documentation indicating recommendations around this have changed in redis 3, either.
I've worked around this problem by using a new redis connection for each command, to ensure it works with 3.x