summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author张文康 <zhangwenkang@zhangwenkangdeMacBook-Pro.local>2017-04-18 20:10:08 +0800
committerantirez <antirez@gmail.com>2017-04-20 07:57:44 +0200
commit2028501776dc076d6f2dbbae579ff3e77a77d637 (patch)
tree9a40d394e084779772ce6d543fee2b6659faeddc
parent05ac217f2f6603332714faa3d34e8098fbe3b044 (diff)
downloadredis-2028501776dc076d6f2dbbae579ff3e77a77d637.tar.gz
update block->free after some diff data are written to the child process
-rw-r--r--src/aof.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index f73da1e25..9b15ad1d0 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -115,6 +115,7 @@ void aofChildWriteDiffData(aeEventLoop *el, int fd, void *privdata, int mask) {
if (nwritten <= 0) return;
memmove(block->buf,block->buf+nwritten,block->used-nwritten);
block->used -= nwritten;
+ block->free += nwritten;
}
if (block->used == 0) listDelNode(server.aof_rewrite_buf_blocks,ln);
}