summaryrefslogtreecommitdiff
path: root/src/tracking.c
diff options
context:
space:
mode:
authorHarkrishn Patro <harkrisp@amazon.com>2022-05-30 22:03:59 -0700
committerGitHub <noreply@github.com>2022-05-31 08:03:59 +0300
commit4065b4f27efc539b86beb63829bc148a02adecb1 (patch)
tree13f2c1d3e1ca0e7710ede98640814e81d837b705 /src/tracking.c
parentd7ae858745f722b845d3540a437f89a7fb8d0bb2 (diff)
downloadredis-4065b4f27efc539b86beb63829bc148a02adecb1.tar.gz
Sharded pubsub publish messagebulk as smessage (#10792)
To easily distinguish between sharded channel message and a global channel message, introducing `smessage` (instead of `message`) as message bulk for sharded channel publish message. This is gonna be a breaking change in 7.0.1! Background: Sharded pubsub introduced in redis 7.0, but after the release we quickly realized that the fact that it's problematic that the client can't distinguish between normal (global) pubsub messages and sharded ones. This is important because the same connection can subscribe to both, but messages sent to one pubsub system are not propagated to the other (they're completely separate), so if one connection is used to subscribe to both, we need to assist the client library to know which message it got so it can forward it to the correct callback.
Diffstat (limited to 'src/tracking.c')
-rw-r--r--src/tracking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tracking.c b/src/tracking.c
index b86d984a7..a659e98dd 100644
--- a/src/tracking.c
+++ b/src/tracking.c
@@ -295,7 +295,7 @@ void sendTrackingMessage(client *c, char *keyname, size_t keylen, int proto) {
} else if (using_redirection && c->flags & CLIENT_PUBSUB) {
/* We use a static object to speedup things, however we assume
* that addReplyPubsubMessage() will not take a reference. */
- addReplyPubsubMessage(c,TrackingChannelName,NULL);
+ addReplyPubsubMessage(c,TrackingChannelName,NULL,shared.messagebulk);
} else {
/* If are here, the client is not using RESP3, nor is
* redirecting to another client. We can't send anything to