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
2e0ab4a8
Unverified
Commit
2e0ab4a8
authored
Jun 16, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Jun 16, 2018
Browse files
Merge pull request #4976 from trevor211/fixDebugLoadaof
Critical: Fix server crash and data inconsistency in some cases.
parents
94658303
7d269d5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
2e0ab4a8
...
...
@@ -348,7 +348,11 @@ NULL
serverLog
(
LL_WARNING
,
"DB reloaded by DEBUG RELOAD"
);
addReply
(
c
,
shared
.
ok
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"loadaof"
))
{
if
(
server
.
aof_state
==
AOF_ON
)
flushAppendOnlyFile
(
1
);
if
(
server
.
aof_state
==
AOF_OFF
)
{
addReply
(
c
,
shared
.
err
);
return
;
}
flushAppendOnlyFile
(
1
);
emptyDb
(
-
1
,
EMPTYDB_NO_FLAGS
,
NULL
);
if
(
loadAppendOnlyFile
(
server
.
aof_filename
)
!=
C_OK
)
{
addReply
(
c
,
shared
.
err
);
...
...
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