]> git.saurik.com Git - redis.git/commit - src/config.h
Incrementally flush RDB on disk while loading it from a master.
authorantirez <antirez@gmail.com>
Fri, 24 Aug 2012 17:28:44 +0000 (19:28 +0200)
committerantirez <antirez@gmail.com>
Tue, 28 Aug 2012 10:47:35 +0000 (12:47 +0200)
commit13732168a50d86a31a7bf01dad8038e316120afb
tree9638cc03eb82c6724773372ffb7dbbafae7ef13f
parent06bd3b9acd86091c91e7bf3bd01c7772aa1616bc
Incrementally flush RDB on disk while loading it from a master.

This fixes issue #539.

Basically if there is enough free memory the OS may buffer the RDB file
that the slave transfers on disk from the master. The file may
actually be flused on disk at once by the operating system when it gets
closed by Redis, causing the close system call to block for a long time.

This patch is a modified version of one provided by yoav-steinberg of
@garantiadata (the original version was posted in the issue #539
comments), and tries to flush the OS buffers incrementally (every 8 MB
of loaded data).
src/config.h
src/fmacros.h
src/redis.c
src/redis.h
src/replication.c