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
5f54a5e6
Commit
5f54a5e6
authored
Aug 17, 2011
by
Pieter Noordhuis
Committed by
antirez
Sep 16, 2011
Browse files
Fix AOF race that may duplicate commands
parent
96674b6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
5f54a5e6
...
...
@@ -766,6 +766,11 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
server
.
appendseldb
=
-
1
;
/* Make sure SELECT is re-issued */
aofUpdateCurrentSize
();
server
.
auto_aofrewrite_base_size
=
server
.
appendonly_current_size
;
/* Clear regular AOF buffer since its contents was just written to
* the new AOF from the background rewrite buffer. */
sdsfree
(
server
.
aofbuf
);
server
.
aofbuf
=
sdsempty
();
}
redisLog
(
REDIS_NOTICE
,
"Background AOF rewrite successful"
);
...
...
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