From 6bc723834038ec30f06e1028d0c7bdffe18df642 Mon Sep 17 00:00:00 2001 From: cxljs Date: Mon, 1 Sep 2025 15:09:32 +0800 Subject: [PATCH] Fix the ReplicaOnly option does not take effect when using NewFailoverClusterClient (#3482) Signed-off-by: Xiaolong Chen Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com> --- sentinel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sentinel.go b/sentinel.go index 819ec192..e4c9d834 100644 --- a/sentinel.go +++ b/sentinel.go @@ -245,6 +245,7 @@ func (opt *FailoverOptions) clusterOptions() *ClusterOptions { MaxRedirects: opt.MaxRetries, + ReadOnly: opt.ReplicaOnly, RouteByLatency: opt.RouteByLatency, RouteRandomly: opt.RouteRandomly,