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
d303bca5
Commit
d303bca5
authored
Jun 22, 2017
by
Suraj Narkhede
Browse files
Fix brpop command table entry and redirect blocked clients.
parent
8b768e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
d303bca5
...
...
@@ -5418,8 +5418,9 @@ int clusterRedirectBlockedClientIfNeeded(client *c) {
return
1
;
}
/* All keys must belong to the same slot, so check first key only. */
di
=
dictGetIterator
(
c
->
bpop
.
keys
);
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
if
((
de
=
dictNext
(
di
))
!=
NULL
)
{
robj
*
key
=
dictGetKey
(
de
);
int
slot
=
keyHashSlot
((
char
*
)
key
->
ptr
,
sdslen
(
key
->
ptr
));
clusterNode
*
node
=
server
.
cluster
->
slots
[
slot
];
...
...
src/server.c
View file @
d303bca5
...
...
@@ -152,7 +152,7 @@ struct redisCommand redisCommandTable[] = {
{
"linsert"
,
linsertCommand
,
5
,
"wm"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"rpop"
,
rpopCommand
,
2
,
"wF"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"lpop"
,
lpopCommand
,
2
,
"wF"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"brpop"
,
brpopCommand
,
-
3
,
"ws"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"brpop"
,
brpopCommand
,
-
3
,
"ws"
,
0
,
NULL
,
1
,
-
2
,
1
,
0
,
0
},
{
"brpoplpush"
,
brpoplpushCommand
,
4
,
"wms"
,
0
,
NULL
,
1
,
2
,
1
,
0
,
0
},
{
"blpop"
,
blpopCommand
,
-
3
,
"ws"
,
0
,
NULL
,
1
,
-
2
,
1
,
0
,
0
},
{
"llen"
,
llenCommand
,
2
,
"rF"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
...
...
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