MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / lookupKeyWriteWithFlags

Function lookupKeyWriteWithFlags

src/db.cpp:249–253  ·  view source on GitHub ↗

Lookup a key for write operations, and as a side effect, if needed, expires * the key if its TTL is reached. * * Returns the linked value object if the key exists or NULL if the key * does not exist in the specified DB. */

Source from the content-addressed store, hash-verified

247 * Returns the linked value object if the key exists or NULL if the key
248 * does not exist in the specified DB. */
249robj *lookupKeyWriteWithFlags(redisDb *db, robj *key, int flags) {
250 expireIfNeeded(db,key);
251 robj *o = lookupKey(db,key,flags|LOOKUP_UPDATEMVCC);
252 return o;
253}
254
255robj *lookupKeyWrite(redisDb *db, robj *key) {
256 return lookupKeyWriteWithFlags(db, key, LOOKUP_NONE);

Callers 2

lookupKeyWriteFunction · 0.85
RM_OpenKeyFunction · 0.85

Calls 2

expireIfNeededFunction · 0.85
lookupKeyFunction · 0.85

Tested by

no test coverage detected