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
b90c72c8
Commit
b90c72c8
authored
Jun 12, 2011
by
Hampus Wessman
Committed by
antirez
Jun 14, 2011
Browse files
Fix automatic rewrite starting too early.
Slight adjustment in growth calculation.
parent
61751a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
b90c72c8
...
@@ -635,7 +635,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
...
@@ -635,7 +635,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