summaryrefslogtreecommitdiff
path: root/src/anet.h
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2019-07-01 15:22:29 +0300
committerOran Agra <oran@redislabs.com>2019-07-08 15:37:48 +0300
commit2de544cfcc6d1aa7cf6d0c75a6116f7fc27b6fd6 (patch)
tree57d2e27d61fd4b5b369a7a3dfb7b8d7ce8d7ad74 /src/anet.h
parent722446510faf0debf0d309708b2ed4fe4d939319 (diff)
downloadredis-2de544cfcc6d1aa7cf6d0c75a6116f7fc27b6fd6.tar.gz
diskless replication on slave side (don't store rdb to file), plus some other related fixes
The implementation of the diskless replication was currently diskless only on the master side. The slave side was still storing the received rdb file to the disk before loading it back in and parsing it. This commit adds two modes to load rdb directly from socket: 1) when-empty 2) using "swapdb" the third mode of using diskless slave by flushdb is risky and currently not included. other changes: -------------- distinguish between aof configuration and state so that we can re-enable aof only when sync eventually succeeds (and not when exiting from readSyncBulkPayload after a failed attempt) also a CONFIG GET and INFO during rdb loading would have lied When loading rdb from the network, don't kill the server on short read (that can be a network error) Fix rdb check when performed on preamble AOF tests: run replication tests for diskless slave too make replication test a bit more aggressive Add test for diskless load swapdb
Diffstat (limited to 'src/anet.h')
-rw-r--r--src/anet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/anet.h b/src/anet.h
index 7142f78d2..dd735240d 100644
--- a/src/anet.h
+++ b/src/anet.h
@@ -70,6 +70,7 @@ int anetEnableTcpNoDelay(char *err, int fd);
int anetDisableTcpNoDelay(char *err, int fd);
int anetTcpKeepAlive(char *err, int fd);
int anetSendTimeout(char *err, int fd, long long ms);
+int anetRecvTimeout(char *err, int fd, long long ms);
int anetPeerToString(int fd, char *ip, size_t ip_len, int *port);
int anetKeepAlive(char *err, int fd, int interval);
int anetSockName(int fd, char *ip, size_t ip_len, int *port);