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

Modify mem_freed variable in evict.c and Update debug.c #376

Merged
merged 1 commit into from Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/debug.c
Expand Up @@ -2625,7 +2625,7 @@ static size_t get_ready_to_signal_threads_tids(int sig_num, pid_t tids[TIDS_MAX_
if(tids_count == TIDS_MAX_SIZE) break;
}

/* Swap the last tid with the the current thread id */
/* Swap the last tid with the current thread id */
if(current_thread_index != -1) {
pid_t last_tid = tids[tids_count - 1];

Expand Down
4 changes: 1 addition & 3 deletions src/evict.c
Expand Up @@ -545,7 +545,7 @@ int performEvictions(void) {

int keys_freed = 0;
size_t mem_reported, mem_tofree;
long long mem_freed; /* May be negative */
long long mem_freed = 0; /* Maybe become negative */
mstime_t latency, eviction_latency;
long long delta;
int slaves = listLength(server.slaves);
Expand All @@ -563,8 +563,6 @@ int performEvictions(void) {

unsigned long eviction_time_limit_us = evictionTimeLimitUs();

mem_freed = 0;

latencyStartMonitor(latency);

monotime evictionTimer;
Expand Down