Extend REDISMODULE_CTX_FLAGS to indicate if redis is currently loading from either RDB or AOF

This commit is contained in:
swilly22
2019-06-12 15:37:19 +03:00
parent 0cabe0cfa7
commit f54d95e803
2 changed files with 5 additions and 0 deletions

View File

@ -1455,6 +1455,9 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
if (server.cluster_enabled)
flags |= REDISMODULE_CTX_FLAGS_CLUSTER;
if (server.loading)
flags |= REDISMODULE_CTX_FLAGS_LOADING;
/* Maxmemory and eviction policy */
if (server.maxmemory > 0) {
flags |= REDISMODULE_CTX_FLAGS_MAXMEMORY;