Merge pull request #5453 from damz/pr/aof-buffer-evict

Overhead is the allocated size of the AOF buffer, not its length
This commit is contained in:
Salvatore Sanfilippo 2018-10-24 12:28:28 +02:00 committed by GitHub
commit a2131f907a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -364,7 +364,7 @@ size_t freeMemoryGetNotCountedMemory(void) {
} }
} }
if (server.aof_state != AOF_OFF) { if (server.aof_state != AOF_OFF) {
overhead += sdslen(server.aof_buf)+aofRewriteBufferSize(); overhead += sdsalloc(server.aof_buf)+aofRewriteBufferSize();
} }
return overhead; return overhead;
} }

View File

@ -1011,7 +1011,7 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
mem = 0; mem = 0;
if (server.aof_state != AOF_OFF) { if (server.aof_state != AOF_OFF) {
mem += sdslen(server.aof_buf); mem += sdsalloc(server.aof_buf);
mem += aofRewriteBufferSize(); mem += aofRewriteBufferSize();
} }
mh->aof_buffer = mem; mh->aof_buffer = mem;