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

Function sentinelCheckTiltCondition

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

This function checks if we need to enter the TITL mode. * * The TILT mode is entered if we detect that between two invocations of the * timer interrupt, a negative amount of time, or too much time has passed. * Note that we expect that more or less just 100 milliseconds will pass * if everything is fine. However we'll see a negative number or a * difference bigger than SENTINEL_TILT_TRIGGER

Source from the content-addressed store, hash-verified

5084 *
5085 * During TILT time we still collect information, we just do not act. */
5086void sentinelCheckTiltCondition(void) {
5087 mstime_t now = mstime();
5088 mstime_t delta = now - sentinel.previous_time;
5089
5090 if (delta < 0 || delta > SENTINEL_TILT_TRIGGER) {
5091 sentinel.tilt = 1;
5092 sentinel.tilt_start_time = mstime();
5093 sentinelEvent(LL_WARNING,"+tilt",NULL,"#tilt mode entered");
5094 }
5095 sentinel.previous_time = mstime();
5096}
5097
5098void sentinelTimer(void) {
5099 sentinelCheckTiltCondition();

Callers 1

sentinelTimerFunction · 0.85

Calls 2

sentinelEventFunction · 0.85
mstimeFunction · 0.70

Tested by

no test coverage detected