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

Function replicateSubkeyExpire

src/replication.cpp:5597–5607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5595}
5596
5597void replicateSubkeyExpire(redisDb *db, robj_roptr key, robj_roptr subkey, long long expire) {
5598 if (!g_pserver->fActiveReplica || listLength(g_pserver->slaves) == 0)
5599 return;
5600
5601 redisObjectStack objTtl;
5602 initStaticStringObject(objTtl, sdscatprintf(sdsempty(), "%lld", expire));
5603 redisObject *argv[4] = {shared.pexpirememberat, key.unsafe_robjcast(), subkey.unsafe_robjcast(), &objTtl};
5604 replicationFeedSlaves(g_pserver->slaves, db->id, argv, 4);
5605
5606 sdsfree(szFromObj(&objTtl));
5607}
5608
5609void _clientAsyncReplyBufferReserve(client *c, size_t len);
5610

Callers 1

processJobMethod · 0.85

Calls 6

sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
replicationFeedSlavesFunction · 0.85
sdsfreeFunction · 0.85
szFromObjFunction · 0.85
unsafe_robjcastMethod · 0.80

Tested by

no test coverage detected