--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
Cheers,
Salvatore
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele
Only on startup. During sync there is a similar error if you configure
Redis to avoid serving data while the slave is not connected to the
master. Otherwise it will silently reconnect while replying to
queries. It depends on the application needs.
Salvatore
I'll fix this ASAP and release a new version of Redis.
Thanks for submitting,
Salvatore
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>
--
It happens.
> There are 2 points during the sync where my client is unable to
> retrieve the value of 123 from redis.
>
> 1) It appears that redis disconnects the clients and is unavailable
> for (6 seconds).
> 2) While redis is loading the dataset into memory (13 seconds).
>
> Are you saying that my client should not be disconnected, but simply
> see the message "LOADING Redis is loading the dataset in memory" for a
> total of 19 seconds?
Yes.
> What I would really like to do is have a
> deterministic amount of time < 1 second where the client is unable to
> retrieve the value of 123. If that is not possible the next best thing
> would be to control when redis reloads the dataset. In other words,
> for my usage it's preferable to serve stale data as opposed to no
> data. If I can control when redis is unavailable that would allow me
> to perform rolling syncs across the cluster to make sure I will always
> be able to retrive data from redis.
When you know your master has gone down, tell your slaves "slaveof no
one". In a rolling fashion, on a schedule you determine, tell your
slaves "slaveof host port".
- Josiah
I don't know if there is a configuration setting to not resync on
reconnect (there definitely should be), but I think this should
work...
1. Give your master a password via requirepass in it's config file.
2. Add the proper SLAVEOF configuration to the .conf file on all of your slaves,
3. Add an improper password to the .conf file on all of your slaves.
4. Now, since each slave has the wrong password, it will fail to
(re)auth against the master, so won't (re)sync.
5. When you discover that a slave is (or some slaves are) out of sync
with the master (because they have disconnected, or were never
connected), you can in a rolling fashion tell them "slaveof no one",
"config set masterauth proper_password", "slaveof host port", and
finally "config set masterauth bad_password" to ensure that it doesn't
automatically resync in the future.
Sound good?
Regards,
On Sat, Apr 16, 2011 at 13:20, Salvatore Sanfilippo <ant...@gmail.com> wrote:
> I think this is a bug, the slave should block the clients while
> loading the dataset in memory...
>
> I'll fix this ASAP and release a new version of Redis.
Has this been fixed and/or backported to 2.2 too? I can't see anything
referring to it on [1] and it's an interesting feature for our
platform :)
[1] https://raw.github.com/antirez/redis/2.2/00-RELEASENOTES
Cheers,
Sandro
ps: I'll follow-up with a feature request with an issue, related to
startup and slave sync with master.
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi