Repository navigation
Releases
3.5.0
Upgrade notes
-
Source break on C# 12 and earlier:
HashSlot("key")can become ambiguous (CS0121).IConnectionMultiplexer/ConnectionMultiplexergainedHashSlot(RedisChannel)alongsideHashSlot(RedisKey);stringandbyte[]convert implicitly to both. On C# 13+,[OverloadResolutionPriority]keeps those calls binding toHashSlot(RedisKey); older language versions ignore the attribute. That includes net8.0's default (C# 12) and .NET Framework / netstandard projects (C# 7.3). Fix: pass a key explicitly (HashSlot((RedisKey)"key")), or set<LangVersion>13</LangVersion>or later. Binary compatibility is unaffected; see #3366 -
New interface members. Code that implements these interfaces itself (decorators, hand-written fakes) needs the new members:
IConnectionMultiplexer.HashSlot(RedisChannel)(#3366);- the experimental Redis 8.12 methods on
IDatabase,IDatabaseAsyncandIServer(#3343).
ReauthenticateAsyncis deliberately an extension method onIConnectionMultiplexer, so it adds nothing to implement. -
New enum value:
ConnectionFailureType.Reauthentication; exhaustiveswitches overConnectionFailureTypemay need a case (#3373) -
Experimental (
SER011): the Redis 8.12 APIs (bit positions, set-member expiration,BLESS,ZMOVE,CommandTrace.CpuTime) are behind theSER011diagnostic, and their shape may change; see #3343 -
Behaviour changes worth knowing:
- Sentinel: a sentinel-managed connection now follows the replicas sentinel lists: it adds new ones and retires those sentinel drops or holds down. A replica is only retired once it's disconnected across 3 consecutive checks. Discovery and recovery no longer block thread-pool threads. See #3385, #3301
- Primary/replica without Sentinel: a
READONLYreply from a server we treat as primary now triggers an immediate role re-read, instead of waiting up toConfigCheckSeconds; see #3384 - Transactions containing primary-only work now run on the primary when the caller asked for
PreferReplica. Read-only transactions still follow the caller's flags. See #3381 - Replicas answering
LOADINGare taken out of selection until they're ready, and the command is reissued elsewhere; see #3382 - Pub/sub: a subscribe that fails on a connection that stays up is retried from the heartbeat, instead of waiting for a reconnect; see #3387
Features
- Redis 8.12: bit enumeration, set-member expiration, BLESS, ZMOVE (SER011) by @mgravell in #3343
- ReauthenticateAsync: refresh AUTH on all live connections, including dedicated subscription connections by @mgravell in #3373
- Expose
HashSlot(RedisChannel)onIConnectionMultiplexerby @aradalvand in #3366
Fixes
Pub/sub
- Pub/sub: overlapping subscription restores cannot register on two servers by @mgravell in #3353
- Pub/sub: a multi-node subscription forgets its disconnected nodes, not its connected ones by @mgravell in #3374
- Pub/Sub: don't orphan a subscribe that races the last unsubscribe of the same channel by @aradalvand in #3363
- Pub/sub: a publish that demands a primary does not follow a subscription onto a replica (#3357) by @mgravell in #3380
- Pub/Sub: track retiring subscriptions and drive cleanup via ack, restore, and heartbeat by @aradalvand in #3368
- Pub/sub: retry a failed subscribe from the heartbeat while its connection stays up by @mgravell in #3387
Sentinel
- Sentinel: discover and recover without blocking thread-pool workers by @rebaseandpanic in #3301
- Sentinel: follow the replicas sentinel lists, not only on a switch to a new primary by @mgravell in #3385
- Sentinel: don't re-read topology after repeated connect failures by @mgravell in #3392
Routing, roles and topology
- INCREX and ARGREP are routed by key on a cluster by @mgravell in #3352
- Prefer announce hostname when dialing cluster node on reconnect by @meerasridharan-28 in #3333
- Re-read server roles promptly when a primary answers READONLY (without Sentinel) by @mgravell in #3384
- Send a transaction to the primary when it has primary-only work and the caller prefers a replica by @ShmueLior in #3381
- Enhance handling of loading replicas when replying LOADING by @lamoboos223 in #3382
Connection lifecycle
- Dispose socketless tunnel streams on connection shutdown by @mgravell in #3361
- Close three dispose/connect/topology windows behind intermittent CI failures by @mgravell in #3386
Docs
CI and engineering
- Fix build: MultiNodeSubscriptionTrackingTests uses the renamed TryAdoptEndpoint by @mgravell in #3376
- Stabilize two racy tests: keyspace notification counting, and the drain-cap MOVING test by @mgravell in #3393
- Wait for the ConnectionFailed event, not a 3s deadline, in WriteFailure_TearsDownPhysicalConnection by @mgravell in #3394
- GetConnectionId: read the bridge, don't create it by @mgravell in #3395
- Bump to 3.5 and ship the 3.5.0 API surface by @mgravell in #3389
New Contributors
- @meerasridharan-28 made their first contribution in #3333
- @aradalvand made their first contribution in #3363
- @ShmueLior made their first contribution in #3381
- @lamoboos223 made their first contribution in #3382
Full Changelog: 3.4.35...3.5.0
4.0.165-alpha
What's Changed
- WithRetry, WithKeyPrefix and the group database ride the context/executor core by @mgravell in #3338
- v4: per-command cache serve/store flags, and an external-storage policy mode by @mgravell in #3354
- Merge main into v4 (3.4.31): MOVING drain hold, CLUSTER SLOT-STATS, keyed routing tests, SER1xx experiment block by @mgravell in #3355
- v4 overload minimalism: SortedSetRange, Expiration on RESTORE, GeoCenter by @mgravell in #3356
Full Changelog: 4.0.161-alpha...4.0.165-alpha
4.0.161-alpha
What's Changed
- v4: a close with commands in flight no longer completes a call with another call's reply (#3329) by @mgravell in #3332
- LATENCY RESET and CLIENT TRACKING write through IRespArgument operands, and RenderedArgs goes by @mgravell in #3327
- The coverage audit sees v4's RespLiterals fragments and ignores the connection core; CLIENT SETNAME/SETINFO get ledger rows by @mgravell in #3328
- v4: cache hits reuse the deserialized result for provably-shareable types by @mgravell in #3349
Full Changelog: 4.0.155-alpha...4.0.161-alpha
3.4.35
What's Changed
- CLUSTER SLOT-STATS (8.2): per-slot usage statistics on IServer, experimental SER012 by @mgravell in #3341
- Check the maximum operation count in HeartbeatConsistencyCheckPingsAsync by @unsafePtr in #3342
- Links follow the org move to seredis (#3326) by @mgravell in #3344
- MOVING handoff: hold new work in the backlog while the in-flight commands drain, so the recycle happens within a round trip instead of at the window end by @mgravell in #3347
New Contributors
- @unsafePtr made their first contribution in #3342
Full Changelog: 3.4.31...3.4.35
3.4.31
2.13.23
Primary fix
- v2: a close with commands in flight no longer completes a call with the previous call's reply (#3329) by @mgravell in #3331
Additional changes previously only released in v3
- Fix
OperationCountcalculation by @jnyrup in #3095 - Sentinel: re-elect primary on failover between already-known nodes by @rebaseandpanic in #3131
Maintenance inherited from v3
New Contributors
Full Changelog: 2.13.17...2.13.23
4.0.155-alpha
V4 preview. Since 4.0.146-alpha:
- high-integrity mode restored — a sequence check behind every command (#3308)
- client-side caching replaces a TimeToLive-expired entry on the next fill rather than waiting for the sweep (#3318, #3320)
- an ASK re-send keeps
CLIENT CACHINGout of the prefix and exemptsASKINGfrom the sequence check (#3319) - cluster failover recovery — the library's own topology refresh is exempt from the
AllowAdmingate, a replica-write refusal marks the slot map suspect, and losing an established connection prompts a reconfigure (#3324, from the #3323 investigation) - the connect wait covers the eagerly-dialled subscription connection (#3325)
HOTKEYSandCLIENT KILLwrite throughIRespArgumentoperands (#3321)- plus main merged in up to 3.4.29 (#3322)
3.4.29
What's Changed
- (stabilty) Reset a CycleBuffer segment's start trim when it is recycled (#3302) by @mgravell in #3303
- Restore: make the dedicated subscription connection lazy by @mgravell in #3310
- Update RedisType.Bitmap and the keyspace-event tokens to reflect current server values by @mgravell in #3312
- Fix ConnectionGroupMember string-ctor dropping the name by @mgravell in #3314
- Parse unbracketed IPv6 ip:port from the server (#1422) by @mgravell in #3307
- Profile commands sent in a batch (#2175) by @mohsinaliwork686-rgb in #3313
Tooling
- gitignore: .claude is per-user state except .claude/skills by @mgravell in #3306
- Command coverage ledger and audit skill by @mgravell in #3311
- Update public API docs by @mgravell in https://github.com/StackExchange/StackExchange.Redis/pull/3429
New Contributors
- @mohsinaliwork686-rgb made their first contribution in #3313
Full Changelog: 3.4.20...3.4.29
4.0.146-alpha
V4 preview. Since 4.0.127-alpha, mostly client-side caching: Clock eviction, the public ClientCache view (GetClientCache()), opt-in / opt-out modes and flags (#3297), group-level cache configuration (#3304), and the None and KeyspaceNotifications modes with Default falling back to keyspace notifications (#3305); plus main merged in up to 2026-10-23 (#3298).
3.4.20
Stability improvements
- Do not abandon a connection attempt before ConnectTimeout has elapsed by @mgravell in #3277
- Read HELLO "server" before trusting "version" as the Redis API version by @mgravell in #3279
- Sentinel soft-fail follow-ups: discovery failure as RedisConnectionException, late sentinel init, clear LastException by @mgravell in #3280
- Sentinel: re-resolve the primary when it is demoted on a healthy connection by @rebaseandpanic in #3281
- Route as a cluster only with a slot map; take HELLO mode/role from the interactive connection only by @mgravell in #3285
- Fail connection-dropped commands with RedisConnectionException, never a raw transport exception or a cancellation by @mgravell in #3287
- Connection groups: a member answering LOADING triggers an immediate re-probe and re-select by @mgravell in #3289
- IBatch: complete commands refused by a poisoned connection; divert a batch's tail on reconnect by @mgravell in #3286
- Give multi-message sub-commands and injected prefix commands a write time by @mgravell in #3293
- Send primary-only commands to the primary when the caller prefers a replica by @AsadIqbal-Dev in #3291
Maintenance
- Tests: stabilise two recurring Windows CI flakes (hash-field expiry clock skew, backlog counter quiescence) by @mgravell in #3288
- Tests: don't race the connect's own reconfigures in AllClusterCommandsRefusedIsQuiet by @mgravell in #3290
- Refresh package pins: 10.0.13 servicing family and tooling by @mgravell in #3294
- xunit.v3 4.0 on Microsoft.Testing.Platform by @mgravell in #3295
- StyleCop.Analyzers 1.3.151-beta, and the tidy-up it asks for by @mgravell in #3296
New Contributors
- @AsadIqbal-Dev made their first contribution in #3291
Full Changelog: 3.4.5...3.4.20