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
0b17517c
Commit
0b17517c
authored
Jun 12, 2011
by
Hampus Wessman
Browse files
Fix automatic rewrite starting too early.
Slight adjustment in growth calculation.
parent
9e40bce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
0b17517c
...
@@ -699,7 +699,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
...
@@ -699,7 +699,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
{
{
int
base
=
server
.
auto_aofrewrite_base_size
?
int
base
=
server
.
auto_aofrewrite_base_size
?
server
.
auto_aofrewrite_base_size
:
1
;
server
.
auto_aofrewrite_base_size
:
1
;
long
long
growth
=
(
server
.
appendonly_current_size
*
100
/
base
);
long
long
growth
=
(
server
.
appendonly_current_size
*
100
/
base
)
-
100
;
if
(
growth
>=
server
.
auto_aofrewrite_perc
)
{
if
(
growth
>=
server
.
auto_aofrewrite_perc
)
{
redisLog
(
REDIS_NOTICE
,
"Starting automatic rewriting of AOF on %lld%% growth"
,
growth
);
redisLog
(
REDIS_NOTICE
,
"Starting automatic rewriting of AOF on %lld%% growth"
,
growth
);
rewriteAppendOnlyFileBackground
();
rewriteAppendOnlyFileBackground
();
...
...
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