MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sentinelTimer

Function sentinelTimer

app/redis-6.2.6/src/sentinel.c:5098–5112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5096}
5097
5098void sentinelTimer(void) {
5099 sentinelCheckTiltCondition();
5100 sentinelHandleDictOfRedisInstances(sentinel.masters);
5101 sentinelRunPendingScripts();
5102 sentinelCollectTerminatedScripts();
5103 sentinelKillTimedoutScripts();
5104
5105 /* We continuously change the frequency of the Redis "timer interrupt"
5106 * in order to desynchronize every Sentinel from every other.
5107 * This non-determinism avoids that Sentinels started at the same time
5108 * exactly continue to stay synchronized asking to be voted at the
5109 * same time again and again (resulting in nobody likely winning the
5110 * election because of split brain voting). */
5111 server.hz = CONFIG_DEFAULT_HZ + rand() % CONFIG_DEFAULT_HZ;
5112}

Callers 1

serverCronFunction · 0.85

Tested by

no test coverage detected