module documentation mismatches: loading and fork child for 5.0 branch
loading flag was missing from docs, and fork chidl indicator was removed from the code but left int he doc and header, re-adding it to the doc together with the missing function that was needed for it to work.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -1653,6 +1653,7 @@ void openChildInfoPipe(void);
|
||||
void closeChildInfoPipe(void);
|
||||
void sendChildInfo(int process_type);
|
||||
void receiveChildInfo(void);
|
||||
int hasActiveChildProcess();
|
||||
|
||||
/* Sorted sets data type */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user