diff options
author | Shen Longxing <shenlongxing2012@gmail.com> | 2018-07-12 21:21:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-12 21:21:37 +0800 |
commit | c2a85fb3c5291c9f0ebe776117fe4d77222eebb7 (patch) | |
tree | db81f036189031a2bea1a199815813f8d571ea4a /src/redis-check-rdb.c | |
parent | 4cb5bd4e9d33916d133a4bd69188e4f8e1cd76bd (diff) | |
download | redis-c2a85fb3c5291c9f0ebe776117fe4d77222eebb7.tar.gz |
Delete unused role checking.
When check rdb file, it is unnecessary to check role.
Diffstat (limited to 'src/redis-check-rdb.c')
-rw-r--r-- | src/redis-check-rdb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/redis-check-rdb.c b/src/redis-check-rdb.c index 50854be0c..8de1d8f48 100644 --- a/src/redis-check-rdb.c +++ b/src/redis-check-rdb.c @@ -286,12 +286,8 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) { /* Read value */ rdbstate.doing = RDB_CHECK_DOING_READ_OBJECT_VALUE; if ((val = rdbLoadObject(type,&rdb)) == NULL) goto eoferr; - /* Check if the key already expired. This function is used when loading - * an RDB file from disk, either at startup, or when an RDB was - * 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) + /* Check if the key already expired. */ + if (expiretime != -1 && expiretime < now) rdbstate.already_expired++; if (expiretime != -1) rdbstate.expires++; rdbstate.key = NULL; |