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

Function replicationEmptyDbCallback

src/replication.cpp:2329–2338  ·  view source on GitHub ↗

Callback used by emptyDb() while flushing away old data to load * the new dataset received by the master. */

Source from the content-addressed store, hash-verified

2327/* Callback used by emptyDb() while flushing away old data to load
2328 * the new dataset received by the master. */
2329void replicationEmptyDbCallback(void *privdata) {
2330 UNUSED(privdata);
2331 listIter li;
2332 listNode *ln;
2333 listRewind(g_pserver->masters, &li);
2334 while ((ln = listNext(&li)))
2335 {
2336 replicationSendNewlineToMaster((redisMaster*)listNodeValue(ln));
2337 }
2338}
2339
2340/* Once we have a link with the master and the synchronization was
2341 * performed, this function materializes the master client we store

Callers

nothing calls this directly

Calls 3

listRewindFunction · 0.85
listNextFunction · 0.85

Tested by

no test coverage detected