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
f616ecf3
Unverified
Commit
f616ecf3
authored
Jan 08, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Jan 08, 2020
Browse files
Merge pull request #6698 from yossigo/ctx-flags-multi-dirty
Add REDISMODULE_CTX_FLAGS_MULTI_DIRTY.
parents
2ee4f9f3
0c898bdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
f616ecf3
...
@@ -1842,6 +1842,12 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
...
@@ -1842,6 +1842,12 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
flags
|=
REDISMODULE_CTX_FLAGS_REPLICATED
;
flags
|=
REDISMODULE_CTX_FLAGS_REPLICATED
;
}
}
/* For DIRTY flags, we need the blocked client if used */
client
*
c
=
ctx
->
blocked_client
?
ctx
->
blocked_client
->
client
:
ctx
->
client
;
if
(
c
&&
(
c
->
flags
&
(
CLIENT_DIRTY_CAS
|
CLIENT_DIRTY_EXEC
)))
{
flags
|=
REDISMODULE_CTX_FLAGS_MULTI_DIRTY
;
}
if
(
server
.
cluster_enabled
)
if
(
server
.
cluster_enabled
)
flags
|=
REDISMODULE_CTX_FLAGS_CLUSTER
;
flags
|=
REDISMODULE_CTX_FLAGS_CLUSTER
;
...
...
src/redismodule.h
View file @
f616ecf3
...
@@ -110,6 +110,8 @@
...
@@ -110,6 +110,8 @@
#define REDISMODULE_CTX_FLAGS_REPLICA_IS_ONLINE (1<<17)
#define REDISMODULE_CTX_FLAGS_REPLICA_IS_ONLINE (1<<17)
/* There is currently some background process active. */
/* There is currently some background process active. */
#define REDISMODULE_CTX_FLAGS_ACTIVE_CHILD (1<<18)
#define REDISMODULE_CTX_FLAGS_ACTIVE_CHILD (1<<18)
/* The next EXEC will fail due to dirty CAS (touched keys). */
#define REDISMODULE_CTX_FLAGS_MULTI_DIRTY (1<<19)
/* Keyspace changes notification classes. Every class is associated with a
/* Keyspace changes notification classes. Every class is associated with a
* character for configuration purposes.
* character for configuration purposes.
...
...
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