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
677e95e2
Unverified
Commit
677e95e2
authored
Jul 07, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Jul 07, 2019
Browse files
Merge pull request #6161 from swilly22/redismodule-loading-ctx-flag
Extend REDISMODULE_CTX_FLAGS to indicate if redis is loading
parents
a7140047
f54d95e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
677e95e2
...
...
@@ -1466,6 +1466,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
;
...
...
src/redismodule.h
View file @
677e95e2
...
...
@@ -87,6 +87,8 @@
#define REDISMODULE_CTX_FLAGS_OOM_WARNING (1<<11)
/* The command was sent over the replication link. */
#define REDISMODULE_CTX_FLAGS_REPLICATED (1<<12)
/* Redis is currently loading either from AOF or RDB. */
#define REDISMODULE_CTX_FLAGS_LOADING (1<<13)
#define REDISMODULE_NOTIFY_GENERIC (1<<2)
/* g */
...
...
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