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
d721e6e5
Commit
d721e6e5
authored
Jul 05, 2014
by
antirez
Browse files
Log AOF diff sizes in MBs instead of bytes.
parent
e615539c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/aof.c
View file @
d721e6e5
...
@@ -1088,8 +1088,8 @@ int rewriteAppendOnlyFile(char *filename) {
...
@@ -1088,8 +1088,8 @@ int rewriteAppendOnlyFile(char *filename) {
/* Write the received diff to the file. */
/* Write the received diff to the file. */
redisLog
(
REDIS_NOTICE
,
redisLog
(
REDIS_NOTICE
,
"Concatenating %
llu bytes
of AOF diff received from parent."
,
"Concatenating %
.2f MB
of AOF diff received from parent."
,
(
unsigned
long
long
)
sdslen
(
server
.
aof_child_diff
));
(
double
)
sdslen
(
server
.
aof_child_diff
)
/
(
1024
*
1024
)
);
if
(
rioWrite
(
&
aof
,
server
.
aof_child_diff
,
sdslen
(
server
.
aof_child_diff
))
==
0
)
if
(
rioWrite
(
&
aof
,
server
.
aof_child_diff
,
sdslen
(
server
.
aof_child_diff
))
==
0
)
goto
werr
;
goto
werr
;
...
@@ -1329,7 +1329,7 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
...
@@ -1329,7 +1329,7 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
latencyAddSampleIfNeeded
(
"aof-rewrite-diff-write"
,
latency
);
latencyAddSampleIfNeeded
(
"aof-rewrite-diff-write"
,
latency
);
redisLog
(
REDIS_NOTICE
,
redisLog
(
REDIS_NOTICE
,
"
P
arent diff successfully flushed to the rewritten AOF (%
lu bytes)"
,
aofRewriteBufferSize
());
"
Redidual p
arent diff successfully flushed to the rewritten AOF (%
.2f MB)"
,
(
double
)
aofRewriteBufferSize
()
/
(
1024
*
1024
)
);
/* The only remaining thing to do is to rename the temporary file to
/* The only remaining thing to do is to rename the temporary file to
* the configured file and switch the file descriptor used to do AOF
* the configured file and switch the file descriptor used to do AOF
...
...
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