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

Function evictionTimeProc

src/evict.cpp:555–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553 * more evictable items. */
554static int isEvictionProcRunning = 0;
555static int evictionTimeProc(
556 struct aeEventLoop *eventLoop, long long id, void *clientData) {
557 UNUSED(eventLoop);
558 UNUSED(id);
559 UNUSED(clientData);
560 serverAssert(GlobalLocksAcquired());
561
562 if (performEvictions((bool)clientData) == EVICT_RUNNING) return 0; /* keep evicting */
563
564 /* For EVICT_OK - things are good, no need to keep evicting.
565 * For EVICT_FAIL - there is nothing left to evict. */
566 isEvictionProcRunning = 0;
567 return AE_NOMORE;
568}
569
570/* Check if it's safe to perform evictions.
571 * Returns 1 if evictions can be performed

Callers

nothing calls this directly

Calls 2

GlobalLocksAcquiredFunction · 0.85
performEvictionsFunction · 0.85

Tested by

no test coverage detected