Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable eviction tenacity feature for storage providers #439

Open
wants to merge 1 commit into
base: main_pre_flash
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/evict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ static int evictionTimeProc(
UNUSED(clientData);
serverAssert(GlobalLocksAcquired());

if (performEvictions(false) == EVICT_RUNNING) return 0; /* keep evicting */
if (performEvictions((bool)clientData) == EVICT_RUNNING) return 0; /* keep evicting */

/* For EVICT_OK - things are good, no need to keep evicting.
* For EVICT_FAIL - there is nothing left to evict. */
Expand Down Expand Up @@ -832,12 +832,12 @@ int performEvictions(bool fPreSnapshot) {
/* After some time, exit the loop early - even if memory limit
* hasn't been reached. If we suddenly need to free a lot of
* memory, don't want to spend too much time here. */
if (g_pserver->m_pstorageFactory == nullptr && elapsedUs(evictionTimer) > eviction_time_limit_us) {
if (elapsedUs(evictionTimer) > eviction_time_limit_us) {
// We still need to free memory - start eviction timer proc
if (!isEvictionProcRunning && serverTL->el != nullptr) {
isEvictionProcRunning = 1;
aeCreateTimeEvent(serverTL->el, 0,
evictionTimeProc, NULL, NULL);
evictionTimeProc, (void*)fPreSnapshot, NULL);
}
break;
}
Expand Down