Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a2131f90
Unverified
Commit
a2131f90
authored
Oct 24, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Oct 24, 2018
Browse files
Merge pull request #5453 from damz/pr/aof-buffer-evict
Overhead is the allocated size of the AOF buffer, not its length
parents
8749fc3f
29e488cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/evict.c
View file @
a2131f90
...
@@ -364,7 +364,7 @@ size_t freeMemoryGetNotCountedMemory(void) {
...
@@ -364,7 +364,7 @@ size_t freeMemoryGetNotCountedMemory(void) {
}
}
}
}
if
(
server
.
aof_state
!=
AOF_OFF
)
{
if
(
server
.
aof_state
!=
AOF_OFF
)
{
overhead
+=
sds
len
(
server
.
aof_buf
)
+
aofRewriteBufferSize
();
overhead
+=
sds
alloc
(
server
.
aof_buf
)
+
aofRewriteBufferSize
();
}
}
return
overhead
;
return
overhead
;
}
}
...
...
src/object.c
View file @
a2131f90
...
@@ -1011,7 +1011,7 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
...
@@ -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
+=
sds
len
(
server
.
aof_buf
);
mem
+=
sds
alloc
(
server
.
aof_buf
);
mem
+=
aofRewriteBufferSize
();
mem
+=
aofRewriteBufferSize
();
}
}
mh
->
aof_buffer
=
mem
;
mh
->
aof_buffer
=
mem
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment