Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

SentinelConnect - Primary check not working when user isn't allowed to execute ROLE #3064

Copy link
Copy link
@scorchedSun

Description

@scorchedSun
Issue body actions

Hi,

I'm trying to use StackExchange.Redis to connect to a Valkey instance via Sentinel. Our organization doesn't allow the user to run the ROLE command, leading to the following line to result in an exception:

if (connection.GetServer(newPrimaryEndPoint)?.Role()?.Value == RedisLiterals.master)

There was an issue in 2023 where a change for this was suggested by @NickCraver: #2461

if (connection.GetServer(newPrimaryEndPoint)?.IsReplica == false)

I tested this change with my configuration and it worked pretty well.

Is there any chance in adding this change after all this time? I would have opened a PR but don't want to take credit for something I didn't come up with.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.