modify the read buf size according to the write buf size PROTO_IOBUF_LEN defined before

This commit is contained in:
Hengjian Tang 2020-02-25 15:55:28 +08:00 committed by antirez
parent 15ea13245a
commit 973297336f

View File

@ -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;