Merge pull request #3950 from kensou97/unstable

update block->free after some diff data are written to the child process
This commit is contained in:
Salvatore Sanfilippo 2017-04-20 07:55:51 +02:00 committed by GitHub
commit 3773c06d28

View File

@ -115,6 +115,7 @@ void aofChildWriteDiffData(aeEventLoop *el, int fd, void *privdata, int mask) {
if (nwritten <= 0) return; if (nwritten <= 0) return;
memmove(block->buf,block->buf+nwritten,block->used-nwritten); memmove(block->buf,block->buf+nwritten,block->used-nwritten);
block->used -= nwritten; block->used -= nwritten;
block->free += nwritten;
} }
if (block->used == 0) listDelNode(server.aof_rewrite_buf_blocks,ln); if (block->used == 0) listDelNode(server.aof_rewrite_buf_blocks,ln);
} }