Skip to content

Commit

Permalink
update variable
Browse files Browse the repository at this point in the history
Signed-off-by: Shivshankar-Reddy <[email protected]>
  • Loading branch information
Shivshankar-Reddy committed Apr 9, 2024
1 parent 6524a71 commit 9f318a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2245,8 +2245,8 @@ int setOOMScoreAdj(int process_class) {
char buf[64];

if (server.oom_score_adj != OOM_SCORE_ADJ_NO) {
if (!oom_score_adjusted_by_redis) {
oom_score_adjusted_by_redis = 1;
if (!oom_score_adjusted_by_valkey) {
oom_score_adjusted_by_valkey = 1;
/* Backup base value before enabling the server control over oom score */
fd = open("/proc/self/oom_score_adj", O_RDONLY);
if (fd < 0 || read(fd, buf, sizeof(buf)) < 0) {
Expand Down

0 comments on commit 9f318a9

Please sign in to comment.