Adding set repl-syncio-timeout in config command #886

wants to merge 2 commits into from

3 participants


Adding repl-syncio-timeout in config Command.
regardless of any other issue. I think it is better to set timeout values.

redis> config get repl-syncio-timeout
1) "repl-syncio-timeout"
2) "5"


redis> config get repl-syncio-timeout
1) "repl-syncio-timeout"
2) "3"

Hello! I'm perplexed about the two additions, especially the one about freeMemoryIfNeeded().

1) I agree that's an odd condition to set maxmemory on the slave side, however it is not entirely crazy. For instance I may have a farm of Redis instances used just for caching, and I want to use all the slaves to scale reads, and different slaves will have different amounts of installed memory. Right now it is possible while a bit strange, if I apply this change it will no longer be possible.

2) About repl-syncio-timeout, I've the feeling this is not to be exposed to the user, because when this timeout is used we are not doing some kind of O(N) effort that depends on speed of disk or alike. If the master can't accept the connection in 5 seconds, well, we need to stop trying to replicate with it, because otherwise we block the slave.

At the same time exposing it in clear words to the user is hard, and there is little the user can do about this parameter. Even if your muster is so busy and ruined by load that it can't reply in 5 seconds most of the times, the slave will retry to connect and eventually it may succeed if the master works at all. Otherwise it is important for our slave to be able to disconnect to accept other commands and possibly to get reconfigured by a Redis Sentinel instance.

Thanks anyway! And have a good weekend. Closing.

@antirez antirez closed this Jan 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment