Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0420c327
Commit
0420c327
authored
Jul 10, 2018
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
28e95c7c
7239e9ca
Changes
6
Show whitespace changes
Inline
Side-by-side
src/ae.c
View file @
0420c327
src/blocked.c
View file @
0420c327
...
@@ -406,10 +406,13 @@ void handleClientsBlockedOnKeys(void) {
...
@@ -406,10 +406,13 @@ void handleClientsBlockedOnKeys(void) {
/* Lookup the consumer for the group, if any. */
/* Lookup the consumer for the group, if any. */
streamConsumer
*
consumer
=
NULL
;
streamConsumer
*
consumer
=
NULL
;
int
noack
=
0
;
if
(
group
)
{
if
(
group
)
{
consumer
=
streamLookupConsumer
(
group
,
consumer
=
streamLookupConsumer
(
group
,
receiver
->
bpop
.
xread_consumer
->
ptr
,
receiver
->
bpop
.
xread_consumer
->
ptr
,
1
);
1
);
noack
=
receiver
->
bpop
.
xread_group_noack
;
}
}
/* Emit the two elements sub-array consisting of
/* Emit the two elements sub-array consisting of
...
@@ -426,7 +429,7 @@ void handleClientsBlockedOnKeys(void) {
...
@@ -426,7 +429,7 @@ void handleClientsBlockedOnKeys(void) {
};
};
streamReplyWithRange
(
receiver
,
s
,
&
start
,
NULL
,
streamReplyWithRange
(
receiver
,
s
,
&
start
,
NULL
,
receiver
->
bpop
.
xread_count
,
receiver
->
bpop
.
xread_count
,
0
,
group
,
consumer
,
0
,
&
pi
);
0
,
group
,
consumer
,
noack
,
&
pi
);
/* Note that after we unblock the client, 'gt'
/* Note that after we unblock the client, 'gt'
* and other receiver->bpop stuff are no longer
* and other receiver->bpop stuff are no longer
...
...
src/networking.c
View file @
0420c327
...
@@ -140,6 +140,7 @@ client *createClient(int fd) {
...
@@ -140,6 +140,7 @@ client *createClient(int fd) {
c
->
bpop
.
target
=
NULL
;
c
->
bpop
.
target
=
NULL
;
c
->
bpop
.
xread_group
=
NULL
;
c
->
bpop
.
xread_group
=
NULL
;
c
->
bpop
.
xread_consumer
=
NULL
;
c
->
bpop
.
xread_consumer
=
NULL
;
c
->
bpop
.
xread_group_noack
=
0
;
c
->
bpop
.
numreplicas
=
0
;
c
->
bpop
.
numreplicas
=
0
;
c
->
bpop
.
reploffset
=
0
;
c
->
bpop
.
reploffset
=
0
;
c
->
woff
=
0
;
c
->
woff
=
0
;
...
...
src/server.c
View file @
0420c327
src/server.h
View file @
0420c327
...
@@ -665,6 +665,7 @@ typedef struct blockingState {
...
@@ -665,6 +665,7 @@ typedef struct blockingState {
robj
*
xread_group
;
/* XREADGROUP group name. */
robj
*
xread_group
;
/* XREADGROUP group name. */
robj
*
xread_consumer
;
/* XREADGROUP consumer name. */
robj
*
xread_consumer
;
/* XREADGROUP consumer name. */
mstime_t
xread_retry_time
,
xread_retry_ttl
;
mstime_t
xread_retry_time
,
xread_retry_ttl
;
int
xread_group_noack
;
/* BLOCKED_WAIT */
/* BLOCKED_WAIT */
int
numreplicas
;
/* Number of replicas we are waiting for ACK. */
int
numreplicas
;
/* Number of replicas we are waiting for ACK. */
...
...
src/t_stream.c
View file @
0420c327
...
@@ -1461,6 +1461,7 @@ void xreadCommand(client *c) {
...
@@ -1461,6 +1461,7 @@ void xreadCommand(client *c) {
incrRefCount
(
consumername
);
incrRefCount
(
consumername
);
c
->
bpop
.
xread_group
=
groupname
;
c
->
bpop
.
xread_group
=
groupname
;
c
->
bpop
.
xread_consumer
=
consumername
;
c
->
bpop
.
xread_consumer
=
consumername
;
c
->
bpop
.
xread_group_noack
=
noack
;
}
else
{
}
else
{
c
->
bpop
.
xread_group
=
NULL
;
c
->
bpop
.
xread_group
=
NULL
;
c
->
bpop
.
xread_consumer
=
NULL
;
c
->
bpop
.
xread_consumer
=
NULL
;
...
...
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