summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHengjian Tang <hengjian_tang@TSG.AISE.com>2020-02-25 15:55:28 +0800
committerantirez <antirez@gmail.com>2020-02-27 18:02:30 +0100
commit973297336fc05a601e17be70aba88e5dca6480ae (patch)
tree571eeeb884c14be45c68ee5b1966df8ed6fe0fc6
parent15ea13245ae388a34277595efaf17e94cb6b6bc1 (diff)
downloadredis-973297336fc05a601e17be70aba88e5dca6480ae.tar.gz
modify the read buf size according to the write buf size PROTO_IOBUF_LEN defined before
-rw-r--r--src/replication.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/replication.c b/src/replication.c
index 4843f97d5..c497051c8 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -1352,7 +1352,7 @@ void disklessLoadRestoreBackups(redisDb *backup, int restore, int empty_db_flags
/* Asynchronously read the SYNC payload we receive from a master */
#define REPL_MAX_WRITTEN_BEFORE_FSYNC (1024*1024*8) /* 8 MB */
void readSyncBulkPayload(connection *conn) {
- char buf[4096];
+ char buf[PROTO_IOBUF_LEN];
ssize_t nread, readlen, nwritten;
int use_diskless_load = useDisklessLoad();
redisDb *diskless_load_backup = NULL;