Skip to content

Add missing shard channel message types to async PubSub#3966

Merged
petyaslavova merged 2 commits intoredis:masterfrom
bysiber:fix-async-pubsub-shard-channels
Feb 22, 2026
Merged

Add missing shard channel message types to async PubSub#3966
petyaslavova merged 2 commits intoredis:masterfrom
bysiber:fix-async-pubsub-shard-channels

Conversation

@bysiber
Copy link
Copy Markdown
Contributor

@bysiber bysiber commented Feb 20, 2026

The async PubSub class is missing "smessage" in PUBLISH_MESSAGE_TYPES and "sunsubscribe" in UNSUBSCRIBE_MESSAGE_TYPES. The sync version already has these for Redis 7.0+ shard channel support.

Without them, incoming smessage messages from shard channel subscriptions are not recognized as publish messages, so registered callbacks are never invoked. Similarly, sunsubscribe confirmations are not handled, leaving the shard_channels dict and pending_unsubscribe_shard_channels set uncleaned — a memory leak over the lifetime of the PubSub instance.

Copy link
Copy Markdown
Collaborator

@petyaslavova petyaslavova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@petyaslavova petyaslavova added the maintenance Maintenance (CI, Releases, etc) label Feb 20, 2026
@petyaslavova petyaslavova merged commit bb80d3f into redis:master Feb 22, 2026
120 of 121 checks passed
petyaslavova added a commit that referenced this pull request Feb 25, 2026
Co-authored-by: petyaslavova <petya.slavova@redis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance (CI, Releases, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants