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
c2a85fb3
Unverified
Commit
c2a85fb3
authored
Jul 12, 2018
by
Shen Longxing
Committed by
GitHub
Jul 12, 2018
Browse files
Delete unused role checking.
When check rdb file, it is unnecessary to check role.
parent
4cb5bd4e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-check-rdb.c
View file @
c2a85fb3
...
@@ -286,12 +286,8 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) {
...
@@ -286,12 +286,8 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) {
/* Read value */
/* Read value */
rdbstate
.
doing
=
RDB_CHECK_DOING_READ_OBJECT_VALUE
;
rdbstate
.
doing
=
RDB_CHECK_DOING_READ_OBJECT_VALUE
;
if
((
val
=
rdbLoadObject
(
type
,
&
rdb
))
==
NULL
)
goto
eoferr
;
if
((
val
=
rdbLoadObject
(
type
,
&
rdb
))
==
NULL
)
goto
eoferr
;
/* Check if the key already expired. This function is used when loading
/* Check if the key already expired. */
* an RDB file from disk, either at startup, or when an RDB was
if
(
expiretime
!=
-
1
&&
expiretime
<
now
)
* received from the master. In the latter case, the master is
* responsible for key expiry. If we would expire keys here, the
* snapshot taken by the master may not be reflected on the slave. */
if
(
server
.
masterhost
==
NULL
&&
expiretime
!=
-
1
&&
expiretime
<
now
)
rdbstate
.
already_expired
++
;
rdbstate
.
already_expired
++
;
if
(
expiretime
!=
-
1
)
rdbstate
.
expires
++
;
if
(
expiretime
!=
-
1
)
rdbstate
.
expires
++
;
rdbstate
.
key
=
NULL
;
rdbstate
.
key
=
NULL
;
...
...
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