| 553 | * more evictable items. */ |
| 554 | static int isEvictionProcRunning = 0; |
| 555 | static 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 |
nothing calls this directly
no test coverage detected