| 121 | } |
| 122 | } |
| 123 | static robj_roptr lookupKeyConst(redisDb *db, robj *key, int flags) { |
| 124 | serverAssert((flags & LOOKUP_UPDATEMVCC) == 0); |
| 125 | robj_roptr val; |
| 126 | if (g_pserver->m_pstorageFactory) |
| 127 | val = db->find(szFromObj(key)).val(); |
| 128 | else |
| 129 | val = db->find_cached_threadsafe(szFromObj(key)).val(); |
| 130 | |
| 131 | if (val != nullptr) { |
| 132 | lookupKeyUpdateObj(val.unsafe_robjcast(), flags); |
| 133 | return val; |
| 134 | } |
| 135 | return nullptr; |
| 136 | } |
| 137 | |
| 138 | /* Lookup a key for read operations, or return NULL if the key is not found |
| 139 | * in the specified DB. |
no test coverage detected