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
643ee6e3
Commit
643ee6e3
authored
Oct 31, 2018
by
antirez
Browse files
When replica kills a pending RDB save during SYNC, log it.
This logs what happens in the context of the fix in PR #5367.
parent
8b609c99
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
643ee6e3
...
@@ -1247,6 +1247,12 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
...
@@ -1247,6 +1247,12 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
/* Ensure background save doesn't overwrite synced data */
/* Ensure background save doesn't overwrite synced data */
if
(
server
.
rdb_child_pid
!=
-
1
)
{
if
(
server
.
rdb_child_pid
!=
-
1
)
{
serverLog
(
LL_NOTICE
,
"Replica is about to load the RDB file received from the "
"master, but there is a pending RDB child running. "
"Killing process %ld and removing its temp file to avoid "
"any race"
,
(
long
)
server
.
rdb_child_pid
);
kill
(
server
.
rdb_child_pid
,
SIGUSR1
);
kill
(
server
.
rdb_child_pid
,
SIGUSR1
);
rdbRemoveTempFile
(
server
.
rdb_child_pid
);
rdbRemoveTempFile
(
server
.
rdb_child_pid
);
}
}
...
...
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