summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2020-02-27 10:02:24 +0100
committerGitHub <noreply@github.com>2020-02-27 10:02:24 +0100
commit4f29753726e7e6361e02360f4650fa93a9a0a6bf (patch)
tree7527b4984dae1fee53430c209baf1c6da583a3cd
parent37612118c8c0b2afb2df10fad6c91b4773434c6f (diff)
parent1ab550832477319195cd3455e657e35ab33ae985 (diff)
downloadredis-4f29753726e7e6361e02360f4650fa93a9a0a6bf.tar.gz
Merge pull request #6931 from t00350320/unstable
modify the read buf size according to the write buf size PROTO_IOBUF_LEN
-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;