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
9dd3d2e9
Commit
9dd3d2e9
authored
Oct 29, 2015
by
antirez
Browse files
call(): don't inherit CLIENT_PREVENT_PROP + minor refactoring.
parent
d37ef784
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
9dd3d2e9
...
@@ -2171,9 +2171,12 @@ void call(client *c, int flags) {
...
@@ -2171,9 +2171,12 @@ void call(client *c, int flags) {
replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc);
replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc);
}
}
/* Call the command. */
/* Initialization: clear the flags that must be set by the command on
c->flags &= ~(CLIENT_FORCE_AOF|CLIENT_FORCE_REPL);
* demand, and initialize the array for additional commands propagation. */
c->flags &= ~(CLIENT_FORCE_AOF|CLIENT_FORCE_REPL|CLIENT_PREVENT_PROP);
redisOpArrayInit(&server.also_propagate);
redisOpArrayInit(&server.also_propagate);
/* Call the command. */
dirty = server.dirty;
dirty = server.dirty;
start = ustime();
start = ustime();
c->cmd->proc(c);
c->cmd->proc(c);
...
@@ -2221,7 +2224,7 @@ void call(client *c, int flags) {
...
@@ -2221,7 +2224,7 @@ void call(client *c, int flags) {
propagate(c->cmd,c->db->id,c->argv,c->argc,flags);
propagate(c->cmd,c->db->id,c->argv,c->argc,flags);
}
}
/* Restore the old replication flags, since call can be executed
/* Restore the old replication flags, since call
()
can be executed
* recursively. */
* recursively. */
c->flags &= ~(CLIENT_FORCE_AOF|CLIENT_FORCE_REPL|CLIENT_PREVENT_PROP);
c->flags &= ~(CLIENT_FORCE_AOF|CLIENT_FORCE_REPL|CLIENT_PREVENT_PROP);
c->flags |= client_old_flags &
c->flags |= client_old_flags &
...
...
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