Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4e536240
Commit
4e536240
authored
Apr 11, 2018
by
antirez
Browse files
Modules API: fix OOM_WARNING flag implementation.
parent
0afac693
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
4e536240
...
...
@@ -1373,10 +1373,9 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
/* OOM flag. */
float level;
i
f (
getMaxmemoryState(NULL,NULL,NULL,&level)
== C_ERR) {
flags |= REDISMODULE_CTX_FLAGS_OOM;
i
nt retval =
getMaxmemoryState(NULL,NULL,NULL,&level)
;
if (retval == C_ERR)
flags |= REDISMODULE_CTX_FLAGS_OOM;
if (level > 0.75) flags |= REDISMODULE_CTX_FLAGS_OOM_WARNING;
}
return flags;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment