mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Change the order of start startLoadingFile call in redis-check-rdb. (#8676)
redis_check_rdb in some scenarios only stopLoading is called because startLoadingFile is called too late.
This commit is contained in:
parent
9ae4f5c73d
commit
0418253a9b
@ -192,6 +192,7 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) {
|
|||||||
int closefile = (fp == NULL);
|
int closefile = (fp == NULL);
|
||||||
if (fp == NULL && (fp = fopen(rdbfilename,"r")) == NULL) return 1;
|
if (fp == NULL && (fp = fopen(rdbfilename,"r")) == NULL) return 1;
|
||||||
|
|
||||||
|
startLoadingFile(fp, rdbfilename, RDBFLAGS_NONE);
|
||||||
rioInitWithFile(&rdb,fp);
|
rioInitWithFile(&rdb,fp);
|
||||||
rdbstate.rio = &rdb;
|
rdbstate.rio = &rdb;
|
||||||
rdb.update_cksum = rdbLoadProgressCallback;
|
rdb.update_cksum = rdbLoadProgressCallback;
|
||||||
@ -208,7 +209,6 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expiretime = -1;
|
expiretime = -1;
|
||||||
startLoadingFile(fp, rdbfilename, RDBFLAGS_NONE);
|
|
||||||
while(1) {
|
while(1) {
|
||||||
robj *key, *val;
|
robj *key, *val;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user