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

Method serializeAndStoreChange

src/db.cpp:2919–2928  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

2917}
2918
2919/* static */ void redisDbPersistentData::serializeAndStoreChange(StorageCache *storage, redisDbPersistentData *db, const char *key, bool fUpdate)
2920{
2921 auto itr = db->find_cached_threadsafe(key);
2922 if (itr == nullptr)
2923 return;
2924 robj *o = itr.val();
2925 sds temp = serializeStoredObjectAndExpire(o);
2926 storage->insert((sds)key, temp, sdslen(temp), fUpdate);
2927 sdsfree(temp);
2928}
2929
2930bool redisDbPersistentData::processChanges(bool fSnapshot)
2931{

Callers

nothing calls this directly

Calls 6

sdslenFunction · 0.85
sdsfreeFunction · 0.85
valMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected