Skip to content

Commit

Permalink
Sentinel: Add HELLO support (#2601)
Browse files Browse the repository at this point in the history
This allows connections through Sentinel via RESP3 by adding `HELLO` to the command map.

Fixes #2591.
  • Loading branch information
NickCraver authored Nov 23, 2023
1 parent 79e8346 commit 510b5e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Current package versions:

## Unreleased

- Fix [#2593](https://github.com/StackExchange/StackExchange.Redis/pull/2593): `EXPIRETIME` and `PEXPIRETIME` miscategorized as `PrimaryOnly` commands causing them to fail when issued against a read-only replica.
- Fix [#2593](https://github.com/StackExchange/StackExchange.Redis/pull/2593): `EXPIRETIME` and `PEXPIRETIME` miscategorized as `PrimaryOnly` commands causing them to fail when issued against a read-only replica ([#2593 by slorello89](https://github.com/StackExchange/StackExchange.Redis/pull/2593))
- Fix [#2591](https://github.com/StackExchange/StackExchange.Redis/pull/2591): Add `HELLO` to Sentinel connections so they can support RESP3 ([#2601 by NickCraver](https://github.com/StackExchange/StackExchange.Redis/pull/2601))

## 2.7.4

Expand Down
2 changes: 1 addition & 1 deletion src/StackExchange.Redis/CommandMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public sealed class CommandMap
/// </summary>
/// <remarks><seealso href="https://redis.io/topics/sentinel"/></remarks>
public static CommandMap Sentinel { get; } = Create(new HashSet<string> {
"auth", "ping", "info", "role", "sentinel", "subscribe", "shutdown", "psubscribe", "unsubscribe", "punsubscribe" }, true);
"auth", "hello", "ping", "info", "role", "sentinel", "subscribe", "shutdown", "psubscribe", "unsubscribe", "punsubscribe" }, true);

/// <summary>
/// Create a new <see cref="CommandMap"/>, customizing some commands.
Expand Down
1 change: 1 addition & 0 deletions tests/StackExchange.Redis.Tests/SentinelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public async Task PrimaryConnectAsyncTest()
}

[Fact]
[RunPerProtocol]
public void SentinelConnectTest()
{
var options = ServiceOptions.Clone();
Expand Down

0 comments on commit 510b5e2

Please sign in to comment.