fix(cluster): lazily start sharded subscribers#2090
Merged
PavelPashov merged 8 commits intoredis:mainfrom Mar 19, 2026
Merged
Conversation
e68d706 to
04c5ebe
Compare
5edc7eb to
00b361a
Compare
nkaradzhov
approved these changes
Mar 18, 2026
Contributor
Author
|
run sharded pub sub tests |
Contributor
|
Contributor
|
5493ad6 to
465e01a
Compare
Contributor
|
6d0f77a to
b063326
Compare
github-actions bot
pushed a commit
that referenced
this pull request
Mar 19, 2026
## [5.10.1](v5.10.0...v5.10.1) (2026-03-19) ### Bug Fixes * **cluster:** lazily start sharded subscribers ([#2090](#2090)) ([4f167bb](4f167bb))
|
🎉 This PR is included in version 5.10.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
simong
added a commit
to simong/ioredis
that referenced
this pull request
Apr 8, 2026
…dying * origin: feat: Implement `TracingChannel` support (redis#2089) chore(ci): add custom Redis version to test matrix (redis#2067) chore(deps): update and pin production dependencies (redis#2087) test: race condition in spub/ssub auto-resubscription test (redis#2092) chore(release): 5.10.1 [skip ci] fix(cluster): lazily start sharded subscribers (redis#2090) chore(release): 5.10.0 [skip ci] feat: add hash field expiration commands and tests feat: add hexpireat & hexpiretime (redis#2082) ci: make Coveralls steps non-blocking in test_with_cov workflow (redis#2083)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Medium Risk
Changes sharded Pub/Sub connection lifecycle and retry/health logic in
ClusterSubscriberGroup/ShardedSubscriber, which can affect subscription reliability and reconnect behavior under topology changes or failures.Overview
Sharded Pub/Sub subscribers now start lazily and more safely.
ClusterSubscriberGrouponly starts aShardedSubscriberwhen it owns slots with active channel subscriptions (or whenredisOptions.lazyConnectis disabled), and can also trigger a start on-demand when a slot is first used.Subscriber lifecycle/health handling was tightened.
ShardedSubscribernow tracks explicit status (idle/starting/connected/...), dedupes concurrentstart()calls, prevents revival afterstop(), andreset()logic now replaces unhealthy subscribers and avoids resubscribe attempts when the underlying redis instance is missing/ended.Config + test coverage expanded. The sharded subscriber now inherits
ClusterOptions.redisOptions, and tests add coverage for default laziness, honoringredisOptions.lazyConnect, in-flight start behavior, and replace the single sharded pubsub scenario suite with split E2E suites plus a richer fault-injector client (create/delete DB, more action types) and test utilities (waitForAssertion, stricter message stats access).Written by Cursor Bugbot for commit 5163b9b. This will update automatically on new commits. Configure here.