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

Function sentinelGenerateInitialMonitorEvents

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

This function is called only at startup and is used to generate a * +monitor event for every configured master. The same events are also * generated when a master to monitor is added at runtime via the * SENTINEL MONITOR command. */

Source from the content-addressed store, hash-verified

753 * generated when a master to monitor is added at runtime via the
754 * SENTINEL MONITOR command. */
755void sentinelGenerateInitialMonitorEvents(void) {
756 dictIterator *di;
757 dictEntry *de;
758
759 di = dictGetIterator(sentinel.masters);
760 while((de = dictNext(di)) != NULL) {
761 sentinelRedisInstance *ri = dictGetVal(de);
762 sentinelEvent(LL_WARNING,"+monitor",ri,"%@ quorum %d",ri->quorum);
763 }
764 dictReleaseIterator(di);
765}
766
767/* ============================ script execution ============================ */
768

Callers 1

sentinelIsRunningFunction · 0.85

Calls 4

sentinelEventFunction · 0.85
dictGetIteratorFunction · 0.70
dictNextFunction · 0.70
dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected