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
25f017e5
Commit
25f017e5
authored
May 15, 2018
by
antirez
Browse files
ZPOP: fix replication of blocking ZPOP.
parent
e87c1f1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/blocked.c
View file @
25f017e5
...
@@ -333,10 +333,18 @@ void handleClientsBlockedOnKeys(void) {
...
@@ -333,10 +333,18 @@ void handleClientsBlockedOnKeys(void) {
unblockClient
(
receiver
);
unblockClient
(
receiver
);
genericZpopCommand
(
receiver
,
&
rl
->
key
,
1
,
where
,
1
,
NULL
);
genericZpopCommand
(
receiver
,
&
rl
->
key
,
1
,
where
,
1
,
NULL
);
propagate
(
where
==
ZSET_MIN
?
/* Replicate the command. */
server
.
zpopminCommand
:
server
.
zpopmaxCommand
,
robj
*
argv
[
2
];
receiver
->
db
->
id
,
receiver
->
argv
,
receiver
->
argc
,
struct
redisCommand
*
cmd
=
where
==
ZSET_MIN
?
PROPAGATE_AOF
|
PROPAGATE_REPL
);
server
.
zpopminCommand
:
server
.
zpopmaxCommand
;
argv
[
0
]
=
createStringObject
(
cmd
->
name
,
strlen
(
cmd
->
name
));
argv
[
1
]
=
rl
->
key
;
incrRefCount
(
rl
->
key
);
propagate
(
cmd
,
receiver
->
db
->
id
,
argv
,
2
,
PROPAGATE_AOF
|
PROPAGATE_REPL
);
decrRefCount
(
argv
[
0
]);
decrRefCount
(
argv
[
1
]);
}
}
}
}
}
}
...
...
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