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
d16bb64f
Commit
d16bb64f
authored
Mar 04, 2020
by
antirez
Browse files
Check that the file exists in removeRDBUsedToSyncReplicas().
parent
ff024e30
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
d16bb64f
...
@@ -944,10 +944,14 @@ void removeRDBUsedToSyncReplicas(void) {
...
@@ -944,10 +944,14 @@ void removeRDBUsedToSyncReplicas(void) {
}
}
}
}
if
(
delrdb
)
{
if
(
delrdb
)
{
serverLog
(
LL_NOTICE
,
"Removing the RDB file used to feed replicas "
struct
stat
sb
;
"in a persistence-less instance"
);
if
(
lstat
(
server
.
rdb_filename
,
&
sb
)
!=
-
1
)
{
RDBGeneratedByReplication
=
0
;
RDBGeneratedByReplication
=
0
;
bg_unlink
(
server
.
rdb_filename
);
serverLog
(
LL_NOTICE
,
"Removing the RDB file used to feed replicas "
"in a persistence-less instance"
);
bg_unlink
(
server
.
rdb_filename
);
}
}
}
}
}
}
}
...
...
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