eredis_cluster icon indicating copy to clipboard operation
eredis_cluster copied to clipboard

query block

Open hchw opened this issue 5 years ago • 4 comments

i found query would blocking, when one slot or node crash , because you refresh slots map synchronous how about let refresh asynchronous and let query return fail immediately?

hchw avatar May 07 '19 02:05 hchw

i try to make refresh be a event , and deal it in a event process, and cast the result to monitor. do you have some advice for me?Or do you agree with me? i will make PR when it stable

hchw avatar May 07 '19 02:05 hchw

i found query would blocking, when one slot or node crash , because you refresh slots map synchronous how about let refresh asynchronous and let query return fail immediately?

hello, that's exactly what I'm doing in our use case, also I found the retry https://github.com/adrienmo/eredis_cluster/blob/master/src/eredis_cluster.erl#L178 may be too many, I set it to 2.

clanchun avatar May 07 '19 08:05 clanchun

thank you for your reply. i try to make refresh be a event , cast the event to a new event process to deal the refresh map, and send the result to monitor's state. how about this idea?

hchw avatar May 08 '19 08:05 hchw

thank you for your reply. i try to make refresh be a event , cast the event to a new event process to deal the refresh map, and send the result to monitor's state. how about this idea?

almost the same with my modification, just to be clear, I'm not the maintainer of this repo, I just modified it a bit and is still testing

clanchun avatar May 08 '19 08:05 clanchun