mirror of
https://github.com/fluencelabs/redis
synced 2025-06-17 03:01:20 +00:00
Diskless replication: rio fdset target new supports buffering.
To perform a socket write() for each RDB rio API write call was extremely unefficient, so now rio has minimal buffering capabilities. Writes are accumulated into a buffer and only when a given limit is reacehd are actually wrote to the N slaves FDs. Trivia: rio lacked support for buffering since our targets were: 1) Memory buffers. 2) C standard I/O. Both were buffered already.
This commit is contained in:
@ -1425,6 +1425,9 @@ int rdbSaveToSlavesSockets(void) {
|
||||
redisSetProcTitle("redis-rdb-to-slaves");
|
||||
|
||||
retval = rdbSaveRioWithEOFMark(&slave_sockets,NULL);
|
||||
if (retval == REDIS_OK && rioFlush(&slave_sockets) == 0)
|
||||
retval = REDIS_ERR;
|
||||
|
||||
if (retval == REDIS_OK) {
|
||||
size_t private_dirty = zmalloc_get_private_dirty();
|
||||
|
||||
|
Reference in New Issue
Block a user