diff options
author | Hengjian Tang <hengjian_tang@TSG.AISE.com> | 2020-02-25 15:55:28 +0800 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-02-27 18:02:30 +0100 |
commit | 973297336fc05a601e17be70aba88e5dca6480ae (patch) | |
tree | 571eeeb884c14be45c68ee5b1966df8ed6fe0fc6 | |
parent | 15ea13245ae388a34277595efaf17e94cb6b6bc1 (diff) | |
download | redis-973297336fc05a601e17be70aba88e5dca6480ae.tar.gz |
modify the read buf size according to the write buf size PROTO_IOBUF_LEN defined before
-rw-r--r-- | src/replication.c | 2 |
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; |