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

Method ProcessWhileBlocked

src/rdb.cpp:2847–2862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2845 }
2846
2847 void ProcessWhileBlocked() {
2848 if ((mstime() - lastPing) > 1000) { // Ping if its been a second or longer
2849 listIter li;
2850 listNode *ln;
2851 listRewind(g_pserver->masters, &li);
2852 while ((ln = listNext(&li)))
2853 {
2854 struct redisMaster *mi = (struct redisMaster*)listNodeValue(ln);
2855 if (mi->masterhost && mi->repl_state == REPL_STATE_TRANSFER)
2856 replicationSendNewlineToMaster(mi);
2857 }
2858 lastPing = mstime();
2859 }
2860
2861 processEventsWhileBlocked(serverTL - g_pserver->rgthreadvar);
2862 }
2863
2864 size_t ckeys() { return ckeysLoaded; }
2865

Callers

nothing calls this directly

Calls 5

listRewindFunction · 0.85
listNextFunction · 0.85
mstimeFunction · 0.70

Tested by

no test coverage detected