Open mikhailantoshkin opened 3 months ago
Also note: when subscribed to __redis__:invalidate
on read-only replica, on full resynchronization the message both v9 and v8 breaks.
logs from redis-cli when full resynchronization is triggered
127.0.0.2:6379> client id
(integer) 1255
127.0.0.2:6379> CLIENT TRACKING on REDIRECT 1255 BCAST PREFIX foo
OK
127.0.0.2:6379> SUBSCRIBE __redis__:invalidate
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "__redis__:invalidate"
3) (integer) 1
1) "message"
2) "__redis__:invalidate"
3) (nil)
Logs from the code example provided above for v9:
Listening...
subscribe: __redis__:invalidate
Listening...
redis: unsupported pubsub message: "invalidate"
<nil>
Listening...
Logs for v8
Listening...
subscribe: __redis__:invalidate
Listening...
redis: unsupported pubsub message payload: <nil>
<nil>
Listening...
+1 same problem
go-redis v9 stopped supporting
__redis__:invalidate
messages in pubsub channelsExpected Behavior
Pubsub allows receiving
invalidate
messages from the subscription on__redis__:invalidate
channelCurrent Behavior
In v9
pubsub.Receive
returns errorredis: unsupported pubsub message: "invalidate"
Steps to Reproduce
The following code snippet works fine on v8 but breaks on v9
Running this code with v8 produces the following output when issuing
set foo 1
withredis-cli
Running it with v9 produces the following output when issuing
set foo 1
withredis-cli
Context (Environment)
go version go1.22.6 linux/amd64
I'm implementing client-side cache invalidation (https://redis.io/docs/latest/develop/use/client-side-caching/#broadcasting-mode)