Optimization fails because dbAdd() will ensure the key

Former-commit-id: 1448b555c49fb5ba4a573a97681f7843ba02141f
This commit is contained in:
John Sully 2019-12-22 17:49:54 -05:00
parent 2dc8e866f4
commit 3a3ff9318a

View File

@ -315,7 +315,7 @@ int dbMerge(redisDb *db, robj *key, robj *val, int fReplace)
* *
* All the new keys in the database should be created via this interface. */ * All the new keys in the database should be created via this interface. */
void setKey(redisDb *db, robj *key, robj *val) { void setKey(redisDb *db, robj *key, robj *val) {
auto itr = db->find_cached_threadsafe(szFromObj(key)); auto itr = db->find(szFromObj(key));
if (itr == NULL) { if (itr == NULL) {
dbAdd(db,key,val); dbAdd(db,key,val);
} else { } else {