| 5096 | } |
| 5097 | |
| 5098 | void 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 | } |
no test coverage detected