mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 09:41:21 +00:00
DB API refactoring. The changes were designed together with Pieter Noordhuis.
This commit is contained in:
@ -918,7 +918,7 @@ void stopLoading(void) {
|
||||
int rdbLoad(char *filename) {
|
||||
FILE *fp;
|
||||
uint32_t dbid;
|
||||
int type, retval, rdbver;
|
||||
int type, rdbver;
|
||||
redisDb *db = server.db+0;
|
||||
char buf[1024];
|
||||
time_t expiretime, now = time(NULL);
|
||||
@ -981,11 +981,8 @@ int rdbLoad(char *filename) {
|
||||
continue;
|
||||
}
|
||||
/* Add the new object in the hash table */
|
||||
retval = dbAdd(db,key,val);
|
||||
if (retval == REDIS_ERR) {
|
||||
redisLog(REDIS_WARNING,"Loading DB, duplicated key (%s) found! Unrecoverable error, exiting now.", key->ptr);
|
||||
exit(1);
|
||||
}
|
||||
dbAdd(db,key,val);
|
||||
|
||||
/* Set the expire time if needed */
|
||||
if (expiretime != -1) setExpire(db,key,expiretime);
|
||||
|
||||
|
Reference in New Issue
Block a user