Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d3eeacf9
Commit
d3eeacf9
authored
Nov 19, 2019
by
antirez
Browse files
Merge branch '5.0' of github.com:/antirez/redis into 5.0
parents
da5dc458
09f9e4b0
Changes
3
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
d3eeacf9
...
...
@@ -1518,6 +1518,8 @@ int RM_GetSelectedDb(RedisModuleCtx *ctx) {
* * REDISMODULE_CTX_FLAGS_OOM_WARNING: Less than 25% of memory remains before
* reaching the maxmemory level.
*
* * REDISMODULE_CTX_FLAGS_LOADING: Server is loading RDB/AOF
*
* * REDISMODULE_CTX_FLAGS_REPLICA_IS_STALE: No active link with the master.
*
* * REDISMODULE_CTX_FLAGS_REPLICA_IS_CONNECTING: The replica is trying to
...
...
@@ -1596,6 +1598,9 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
if
(
retval
==
C_ERR
)
flags
|=
REDISMODULE_CTX_FLAGS_OOM
;
if
(
level
>
0
.
75
)
flags
|=
REDISMODULE_CTX_FLAGS_OOM_WARNING
;
/* Presence of children processes. */
if
(
hasActiveChildProcess
())
flags
|=
REDISMODULE_CTX_FLAGS_ACTIVE_CHILD
;
return
flags
;
}
...
...
src/server.c
View file @
d3eeacf9
...
...
@@ -779,6 +779,11 @@ void updateDictResizePolicy(void) {
dictDisableResize();
}
int hasActiveChildProcess() {
return server.rdb_child_pid != -1 ||
server.aof_child_pid != -1;
}
/* ======================= Cron: called every 100 ms ======================== */
/* Add a sample to the operations per second array of samples. */
...
...
src/server.h
View file @
d3eeacf9
...
...
@@ -1653,6 +1653,7 @@ void openChildInfoPipe(void);
void
closeChildInfoPipe
(
void
);
void
sendChildInfo
(
int
process_type
);
void
receiveChildInfo
(
void
);
int
hasActiveChildProcess
();
/* Sorted sets data type */
...
...
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