Commit Graph

107 Commits

Author SHA1 Message Date
monkey 0b855ecda5 fix
Signed-off-by: monkey <golang@88.com>
2021-04-21 15:47:53 +08:00
Stanislas Lange 71502a3e44
sentinel: removed unused field QuerySentinelRandomly
Introduced in 8b19c31049
but all references were removed in 8d9ebc8459
2021-04-19 18:53:38 +02:00
Vladimir Mihailenco 02a9c81ef1 Fix golangci-lint check 2021-03-23 11:02:29 +02:00
monkey c25daee5e6 discoverSentinels read the addr field incorrectly
Signed-off-by: monkey <golang@88.com>
2021-03-12 23:20:58 +08:00
Vladimir Mihailenco 573638ff0c Unexport helper command 2021-03-12 16:08:58 +02:00
monkey af3827aeab fix test error
Signed-off-by: monkey <golang@88.com>
2021-03-12 19:06:11 +08:00
Vladimir Mihailenco 8d9ebc8459 Shuffle sentinel addrs once 2021-02-10 17:25:09 +02:00
renzheng.wang 8b19c31049
Make FailoverClient(sentinel mode) more robust ()
* add failover option AllowDisconnectedSlaves

* checkout unrelated changes

* Make NewFailoverClient (sentinel mode) robust.

* fix lint issue

* Fix bug

* Fix lint issue

* add comment

* checkout unrelated changes

* Refine code

* checkout unrelated changes
2021-02-10 17:20:08 +02:00
darkyzhou ea806acb7e
make error message for unreachable sentinels more clear
The original text `all sentinels are unreachable` can sometimes be misleading, making some users think that all of their redis sentinels are down.

But it might not be the reality especially when using kubernetes and specify `c.sentinelAddrs` as the Service's domain. In this case, when the sentinel to which the domain is redirected runs into some errors despite other sentinels running healthily, the original text given by redis client will be confusing and delivering false message!

Just got out of a similar dilemma after checking the source code, feel free to correct me if I am wrong :)
2020-12-15 19:25:31 +08:00
Vladimir Mihailenco 43d9b98d48 Fix race 2020-12-06 10:05:26 +02:00
git-hulk 956f43e3f9 FIX: data race warning in sentinel client since the newConnPool would spawn the new
goroutine and use the onFailover at the same time.
2020-11-19 20:12:56 +08:00
Dimitrij Denissenko 3fc96195a4 Reduce dependency chain 2020-09-17 14:32:08 +01:00
Vladimir Mihailenco c5d4b71f66 Fix race 2020-09-17 12:36:10 +03:00
Vladimir Mihailenco cbce5dbfa2 Add Sentinel RouteBy 2020-09-11 16:06:08 +03:00
Vladimir Mihailenco b657760cca Tweak number of retries 2020-09-11 12:13:27 +03:00
Vladimir Mihailenco 4877841b11 Rename ReadOnly to SlaveOnly and cleanup 2020-09-09 17:03:47 +03:00
Ehsan Afzali 6c85ee767a Add NewFailoverClusterClient 2020-09-09 15:37:52 +03:00
Vladimir Mihailenco df7fe4e2ce Update changelog 2020-09-05 17:39:26 +03:00
Martin Mlynář 49aac99f9d
FailoverClient with read-only support ()
* FailoverClient with read-only support
2020-09-04 12:54:06 +03:00
Dmitry Shmulevich 9b831b0427
Properly pass username/password in Sentinel ()
* Properly pass username/password in Sentinel

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
2020-08-27 08:51:57 +03:00
刘青 8a3f304b25
Log with context to associate all log by traceID ()
* Log with context to associate all log by traceID
2020-07-18 09:04:36 +03:00
Vladimir Mihailenco ef82e3705c Add OnConnect context 2020-06-10 10:36:22 +03:00
Vladimir Mihailenco 4440575966 Merge branch 'v8' 2020-05-21 10:16:44 +03:00
filipe oliveira cf6cf7f450 Add AuthACL 2020-05-21 08:59:51 +03:00
Vladimir Mihailenco 3dcb844106 Bump major version 2020-05-19 08:52:38 +03:00
Vladimir Mihailenco f5593121e0 Add ctx as first arg 2020-05-19 08:52:38 +03:00
Vladimir Mihailenco d2e52839ee Add WithTimeout 2020-02-02 14:59:27 +02:00
Jack Thomasson 6a5329235d sentinel uses configured Dialer
such as https://godoc.org/golang.org/x/net/proxy#PerHost
2019-11-16 10:20:22 -07:00
李锐 726ddef6f5 fix: FailoverOptions to Options ()
Add missing options to FailoverOptions
2019-10-21 13:21:23 +03:00
Vladimir Mihailenco 4afa84c2c4 Fix sentinel leak 2019-10-08 12:43:00 +03:00
Vladimir Mihailenco 152e52f203 Fix WithContext race 2019-08-24 12:40:23 +03:00
Vladimir Mihailenco 7779accbea Use semantic import versioning 2019-08-08 14:29:44 +03:00
Vladimir Mihailenco f3ce3362a0 Add golangci-lint 2019-07-25 14:36:50 +03:00
Vladimir Mihailenco 2cbb5194fb Fix WithContext and add tests 2019-07-04 11:57:54 +03:00
Vladimir Mihailenco cdfe26b83c Use Dialer in Sentinel failover when available 2019-06-29 12:19:30 +03:00
Vladimir Mihailenco 3bdf64784a Cleanup 2019-06-17 12:32:40 +03:00
Vladimir Mihailenco 880e05d975 Cleanup 2019-06-14 16:00:03 +03:00
Vladimir Mihailenco 53c8a4a6b7 Pass context to Dialer 2019-06-04 14:26:26 +03:00
Vladimir Mihailenco 9dba04507e
Merge pull request from ramonberrutti/sentinel_password
add option for sentinel password
2019-06-04 13:57:50 +03:00
Vladimir Mihailenco 09eb108738 Allow passing context where possible 2019-06-04 13:30:47 +03:00
Vladimir Mihailenco 3da4357c0c Pass network and addr to dialer 2019-06-04 12:40:36 +03:00
Ramón Berrutti c6e879efe2
add option for sentinel password 2019-06-02 13:27:33 -03:00
Vladimir Mihailenco 43fdab312a Update changelog 2019-05-31 17:37:34 +03:00
Vladimir Mihailenco 84422d7ae7 Speedup WithContext 2019-05-31 17:31:54 +03:00
Vladimir Mihailenco 8476dfea4a Replace Wrap* with hooks that support context 2019-05-31 16:36:57 +03:00
Tim Vaillancourt bd3a783a25 Shorten comments 2019-05-25 22:58:27 +02:00
Tim Vaillancourt 0138bc167a merge 2019-05-25 22:56:26 +02:00
Tim Vaillancourt fc8c05a674
Add Sentinel .Ping(), .Set(), .Monitor() and .Delete() 2019-05-25 22:54:40 +02:00
Tim Vaillancourt 0ffcfc31f5 Sync with upstream/master 2019-05-25 22:31:06 +02:00
Tim Vaillancourt 2ff1db24a2
Add .Master(), .Slaves() and .CkQuorum() funcs for Sentinel 2019-05-25 15:22:14 +02:00