Skip to content

Sentinel connection on sync slave #2994

@danieva1488

Description

@danieva1488

I am using sentinel

Redis version: 7.0.15
StackExchange.Redis version: 2.10.1
My connection string configuration is as follows:

"sentinel-redis:26379,defaultDatabase=0,serviceName=mymaster"

Redis configuration:
replica-serve-stale-data **no**

Consumers using only read commands with CommandFlags.PreferReplica

Case: due to an incorrectly configured replication buffer size the slave node was unable to receive data from the master after restart. Its ok.
But consumers successfully connected to this out of sync slave and received an error:
"StackExchange.Redis.RedisServerException: MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no"

What I expected: clients connected only to the second slave (with synced data)

Is it possible to disable connection/balancing on a slave in not master_sync_in_progress:0 state?

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