summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-05-24 15:03:23 +0200
committerantirez <antirez@gmail.com>2012-05-24 15:22:39 +0200
commitbec74b1b9cd57358f24bd7231f879120a5bf61ab (patch)
tree7c5df1ffbfc5434dae0dd048ad8a3dbc00c1af4d /src
parentedb952532d0f6c267fc0ebf7209404dd65df2e18 (diff)
downloadredis-bec74b1b9cd57358f24bd7231f879120a5bf61ab.tar.gz
Add aof_rewrite_buffer_length INFO field.
The INFO output, persistence section, already contained the field describing the size of the current AOF buffer to flush on disk. However the other AOF buffer, used to accumulate changes during an AOF rewrite, was not mentioned in the INFO output. This commit introduces a new field called aof_rewrite_buffer_length with the length of the rewrite buffer.
Diffstat (limited to 'src')
-rw-r--r--src/redis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/redis.c b/src/redis.c
index 73d485a16..c9a2c5bac 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -1876,12 +1876,14 @@ sds genRedisInfoString(char *section) {
"aof_base_size:%lld\r\n"
"aof_pending_rewrite:%d\r\n"
"aof_buffer_length:%zu\r\n"
+ "aof_rewrite_buffer_length:%zu\r\n"
"aof_pending_bio_fsync:%llu\r\n"
"aof_delayed_fsync:%lu\r\n",
(long long) server.aof_current_size,
(long long) server.aof_rewrite_base_size,
server.aof_rewrite_scheduled,
sdslen(server.aof_buf),
+ aofRewriteBufferSize(),
bioPendingJobsOfType(REDIS_BIO_AOF_FSYNC),
server.aof_delayed_fsync);
}