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
fe96e29d
Commit
fe96e29d
authored
Feb 14, 2020
by
antirez
Browse files
Tracking: fix behavior when switchinig from normal to BCAST.
parent
f21be1ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tracking.c
View file @
fe96e29d
...
@@ -269,7 +269,17 @@ void trackingInvalidateKey(robj *keyobj) {
...
@@ -269,7 +269,17 @@ void trackingInvalidateKey(robj *keyobj) {
uint64_t
id
;
uint64_t
id
;
memcpy
(
&
id
,
ri
.
key
,
sizeof
(
id
));
memcpy
(
&
id
,
ri
.
key
,
sizeof
(
id
));
client
*
c
=
lookupClientByID
(
id
);
client
*
c
=
lookupClientByID
(
id
);
if
(
c
==
NULL
||
!
(
c
->
flags
&
CLIENT_TRACKING
))
continue
;
/* Note that if the client is in BCAST mode, we don't want to
* send invalidation messages that were pending in the case
* previously the client was not in BCAST mode. This can happen if
* TRACKING is enabled normally, and then the client switches to
* BCAST mode. */
if
(
c
==
NULL
||
!
(
c
->
flags
&
CLIENT_TRACKING
)
||
c
->
flags
&
CLIENT_TRACKING_BCAST
)
{
continue
;
}
sendTrackingMessage
(
c
,
sdskey
,
sdslen
(
sdskey
),
0
);
sendTrackingMessage
(
c
,
sdskey
,
sdslen
(
sdskey
),
0
);
}
}
raxStop
(
&
ri
);
raxStop
(
&
ri
);
...
...
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