Repository navigation
DOC-7177 Document ioredis smart client handoffs (SCH) [PARKED] - #4252
Open
andy-stark-redis wants to merge 2 commits into
Open
andy-stark-redis wants to merge 2 commits into
andy-stark-redis wants to merge 2 commits into
Conversation
Add a "Connect using Smart client handoffs (SCH)" section to the ioredis connect page (same anchor as the other clients) and an ioredis row to the SCH support table on sch.md. Written against ioredis v6.1.0-beta.1 (redis/ioredis#2165); parked until stable v6.1.0 ships. Verified against the installed ioredis@6.1.0-beta.1 package, not the release notes: option names, defaults, and the MaintNotifications / MaintEndpointType unions come from the shipped .d.ts; the example type-checks (tsc --strict --skipLibCheck; without skipLibCheck the library's own .d.ts fails on untyped redis-errors, an upstream gap). No live handoff was tested: that needs a Redis Cloud/Software maintenance event. Scope facts from built/Redis.js and MaintenanceManager.js: - Cluster connections (ConnectionPool, subscribers, cluster/index) force maintNotifications "disabled", so the OSS Cluster API cell is "-". - Sentinel, Unix socket, custom Connector, subscriber and monitor connections still register and open the relaxed-timeout window on MIGRATING/FAILING_OVER/MOVING; only the handoff is skipped (canHandoffConnection / resolveMaintConfiguredEndpoint return false/null) and they reconnect normally. A WebFetch summary of Redis.ts claimed these were not registered at all - wrong. - RESP3 is the default since v6.0.0 (RedisOptions.js protocol: 3), so unlike node-redis the example omits a protocol option. - Error classes are exported as CommandTimeoutDuringMaintenanceError and SocketTimeoutDuringMaintenanceError (.name matches). The option JSDoc says "CommandTimeoutDuringMaintenance"; docs use the importable name. - A handoff invalidates WATCH and EXEC rejects with WatchError ("Retry it with a fresh WATCH") - not documented for node-redis. Rejected: documenting the "ioredis:maintenance" diagnostics_channel (DataHandler.js publishes each raw notification on it). No other client's SCH section documents observability hooks; add if asked. Unpark watch: re-diff built/redis/RedisOptions.d.ts, built/maintNotifications/index.d.ts and built/index.d.ts at the v6.1.0 tag; cluster support landing before GA would change the table cell and the version note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Contributor
…nits - Frontmatter description said "Python"; now "Node.js/JavaScript", matching ioredis/_index.md. - TLS example mixed readFileSync and fs.readFileSync; all three now use bare readFileSync, matching the node-redis connect page. - SCH relaxed-timeout options state "in milliseconds" explicitly (confirmed by the RedisOptions.d.ts JSDoc). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Documents smart client handoffs (SCH) for ioredis, added in v6.1.0-beta.1 by redis/ioredis#2165.
content/develop/clients/ioredis/connect.md: new Connect using Smart client handoffs (SCH) section (same anchor as the other clients).content/develop/clients/sch.md: ioredis row in the support table (v6.1.0 standard routing, no OSS Cluster API) and arelatedPagesentry.Warning
Do not merge. The docs cite ioredis v6.1.0, which is still in beta. Merge only after a stable v6.1.0 release contains #2165 and
/unparkhas reconciled the page.No
bannerTextwas added: the SCH section is one section of an otherwise-released page, and its version note already says v6.1.0 is required.Park manifest
Ticket: DOC-7177
Parked at: 2026-10-13
Trigger to pick up: a non-prerelease ioredis tag
v6.1.*exists and #2165's merge commitd8ae3cb24c534e77b2c2df2f542cbf4789d758feis an ancestor of it (gh api repos/redis/ioredis/compare/d8ae3cb24c534e77b2c2df2f542cbf4789d758fe...<tag> --jq '{status, behind_by}'→behind_by: 0). The release is cut frommain, which #2165 targets.Labels: parked, do not merge yet
Pinned sources (state observed at park time)
d8ae3cb2; headd02cdc7a; basemain; milestone none; updated 2026-10-12T15:48:05Zgh api repos/redis/ioredis/pulls/2165 --jq '{state, merged, merge_sha: .merge_commit_sha, head_sha: .head.sha, base: .base.ref, updated_at}'v6.1.0-beta.1d9a0b9a3; prerelease; contains #2165 (behind_by: 0). Latest stable:v6.0.0gh api repos/redis/ioredis/releases --jq '.[0:5][] | "\(.tag_name) prerelease=\(.prerelease)"'lib/redis/RedisOptions.ts@ beta.17a7da5bdgh api "repos/redis/ioredis/contents/lib/redis/RedisOptions.ts?ref=<tag>" --jq .shalib/maintNotifications/index.ts@ beta.19bde14d2lib/index.ts@ beta.141dba873lib/Redis.ts@ beta.12da6717clib/cluster/ConnectionPool.ts@ beta.14862fc41If a blob SHA is unchanged at the stable tag, the identifiers that file supports still hold.
Observed shape the page assumes
Semantics — HIGH (read from the installed
ioredis@6.1.0-beta.1build, not the release notes):maintNotificationsdefaults to"auto", and RESP3 has been the default protocol since v6.0.0 (RedisOptions.js:protocol: 3).protocol: 2disables it.cluster/index,ConnectionPool,ClusterSubscriberandShardedSubscriberall forcemaintNotifications: "disabled".path), customConnector, subscriber and monitor connections still register and get relaxed timeouts on MIGRATING/FAILING_OVER/MOVING. Only the handoff is skipped (canHandoffConnection()/resolveMaintConfiguredEndpoint()inRedis.js), so they reconnect normally."auto"endpoint type picks internal/external by private-address check, and an FQDN when TLS is on (resolveMaintEndpointTypeinmaintNotifications/index).WATCH; the pendingEXECrejects withWatchError.Identifiers — MEDIUM (released beta, but pre-GA names can still move). Each was seen in the shipped
.d.ts/.jsnamed:maintNotifications:"auto" | "enabled" | "disabled", default"auto"(redis/RedisOptions.d.ts; unionMaintNotificationsinmaintNotifications/index.d.ts)maintEndpointType:"auto" | "internal-ip" | "internal-fqdn" | "external-ip" | "external-fqdn" | "none", default"auto"(same files; unionMaintEndpointType)maintRelaxedCommandTimeout:number, default10000(redis/RedisOptions.d.ts)maintRelaxedSocketTimeout:number, default10000(redis/RedisOptions.d.ts)CommandTimeoutDuringMaintenanceError: exported fromindex.d.ts;.namematches the class nameSocketTimeoutDuringMaintenanceError: as aboveWatchError: exported fromindex.d.ts, extendsAbortErrorprotocoldefault3(redis/RedisOptions.js)Changelog and source disagree in one place: the option JSDoc calls the errors
CommandTimeoutDuringMaintenance/SocketTimeoutDuringMaintenance, but the exported classes carry anErrorsuffix. The docs use the exported names.Re-check checklist
sch.mdcell (currently-) and the version note inioredis/connect.md.canHandoffConnectionandresolveMaintConfiguredEndpoint).WatchErrorbehavior and message unchanged (errors/WatchError).npm install ioredis@<stable>,tsc --noEmit --strict --skipLibCheckover the section's example (withhost/portplaceholders filled in), plus a@ts-expect-errorinvalidmaintEndpointTypevalue. Without--skipLibCheck, the library's own.d.tsfails on the untypedredis-errorsmodule at beta.1 — check whether that's been fixed.ioredis:maintenancediagnostics_channel(DataHandler.jspublishes each raw notification) is deliberately undocumented, matching the other clients' SCH sections. Revisit if the release notes promote it.On unpark, then
Run
/unpark <this PR>. It reconciles the docs against the settled source and owns the closing sequence; thedo not merge yetguard holds until/finalizecompletes.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only changes with no runtime or security impact; merge is gated on stable ioredis v6.1.0 per the PR park manifest.
Overview
Documents Smart client handoffs (SCH) for ioredis (v6.1.0+), aligning it with the other Redis client connect guides.
The ioredis connect page gets a new Connect using Smart client handoffs (SCH) section with a connection example and option reference (
maintNotifications,maintEndpointType, relaxed timeouts, RESP3, cluster/Sentinel limitations,WatchError, and PrivateLink/PSC notes). Minor fixes on the same page: front matter description corrected to Node.js/JavaScript, and the TLS example usesreadFileSyncconsistently for the CA cert.The SCH overview page links to the new anchor and adds an ioredis row (standard routing v6.1.0; OSS Cluster API not supported).
Reviewed by Cursor Bugbot for commit 2059dc6. Bugbot is set up for automated code reviews on this repo. Configure here.