Anatoly Rugalev
62fc2c821b
Check Failing() before serving random node ( #1825 )
...
* Check Failing() before serving random node
* Revert condition
* Addressed review comments
* Fallback to random failing node
2021-07-18 00:20:48 +08:00
ktaekwon000
ce40cd942a
Allow FIFO pool in redis client ( #1820 )
...
* Initial commit for FIFO pool
* Change PoolType string to PoolFIFO bool
* Remove redundant type
* add PoolFIFO option to all clients
Signed-off-by: monkey92t <golang@88.com>
Co-authored-by: Kim Tae Kwon <taekwon.kim@shopee.com>
Co-authored-by: monkey92t <golang@88.com>
2021-07-16 11:58:01 +08:00
Alexey Makhov
b7d23d446c
GOMAXPROCS usage instead of NumCPU ( #1801 )
2021-06-29 10:37:08 +08:00
Vladimir Mihailenco
02a9c81ef1
Fix golangci-lint check
2021-03-23 11:02:29 +02:00
Vladimir Mihailenco
b267a03f18
Don't accept context in lazy reload
2021-03-05 13:53:15 +02:00
Vladimir Mihailenco
e4b2ca97cd
Fix ReadOnly option in ClusterClient
2021-01-22 09:33:09 +02:00
Vladimir Mihailenco
76fd0eac61
Fix Tx pipeline hook
2021-01-09 09:57:46 +02:00
Ben Keith
74fdad907c
ClusterSlots Config and ReadOnly
...
You have to set the ReadOnly flag on the ClusterOptions to make it fall back to
non-master nodes on reads. For non-clustered situations where you have multiple
nodes in a single ClusterSlot, it made the non-master node useless because it would
never route requests to it and if you set ReadOnly=true it would issue a READONLY
command to it, which would fail.
See comment in code for more details.
2021-01-06 12:14:04 -05:00
Vladimir Mihailenco
143859e345
Rename
2020-12-16 17:45:06 +02:00
Prathik Rajendran M
fd6643daa1
Add support to get cluster replica node for a given key
2020-12-16 16:55:40 +05:30
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
GreenHedgehog
1a65d677b3
Fix not applying updated ClusterClient context after calling WithContext method ( #1480 )
...
pass context to command info cache init call
2020-09-14 15:30:50 +03:00
Vladimir Mihailenco
cbce5dbfa2
Add Sentinel RouteBy
2020-09-11 16:06:08 +03:00
Vladimir Mihailenco
afb0064872
Merge pull request #1484 from go-redis/fix/cluster-node-latency
...
Periodically update Cluster node latency
2020-09-11 14:29:38 +03:00
Vladimir Mihailenco
46e04ce67e
Fix build
2020-09-11 14:17:23 +03:00
Vladimir Mihailenco
83d698027f
Periodically update Cluster node latency
2020-09-11 12:33:03 +03:00
Vladimir Mihailenco
b657760cca
Tweak number of retries
2020-09-11 12:13:27 +03:00
Ehsan Afzali
6c85ee767a
Add NewFailoverClusterClient
2020-09-09 15:37:52 +03:00
Pavlov Aleksey
8a5db20d32
fix nil node dereference when use RouteByLatency in cluster
2020-08-06 18:04:04 +03:00
Vladimir Mihailenco
21a1f58caf
Retry timeout and retryable error
2020-07-24 15:52:15 +03:00
Vladimir Mihailenco
862dcbadae
Try 3 random addrs to load commands
2020-07-19 09:51:41 +03:00
刘青
8a3f304b25
Log with context to associate all log by traceID ( #1413 )
...
* Log with context to associate all log by traceID
2020-07-18 09:04:36 +03:00
Vladimir Mihailenco
38c87c1f84
Fix golangci
2020-07-16 10:01:27 +03:00
Vladimir Mihailenco
d66af70ae8
Rename clusterAddrs to activeAddrs
2020-07-09 11:35:19 +03:00
Vladimir Mihailenco
f108b8bce3
Merge pull request #1377 from davidfu13/master
...
Make cluster client get updated nodes' addrs
2020-07-09 11:27:43 +03:00
Vladimir Mihailenco
1831363467
Add RecordError
2020-07-09 10:39:46 +03:00
Vladimir Mihailenco
dc52593c8c
Reload state on read only error
2020-06-30 11:13:15 +03:00
Vladimir Mihailenco
64995f9a51
Tweak auto-reloads
2020-06-29 17:51:47 +03:00
Vladimir Mihailenco
0ffefcde98
Use random node to load cluster slots
2020-06-29 17:26:11 +03:00
David Fu
bb6761fe83
Make cluster client get updated nodes' addrs
...
During loading state, if all the nodes can't be connected, it's
possible that all the nodes' IP addresses have changed at the same
time. Clear the clusterAddrs so that the cluster client has chance
to get updated nodes' IP addresses by using the initial setting of
cluster addresses.
2020-06-15 15:24:18 +08:00
Vladimir Mihailenco
736fa28659
Cleanup
2020-06-10 15:04:12 +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
Vladimir Mihailenco
f8e2e89878
Add ClusterOptions.NewClient hook
...
Replaces https://github.com/go-redis/redis/pull/1316
2020-05-21 09:34:55 +03:00
Vladimir Mihailenco
2960952204
Merge pull request #1316 from YiweiZhuang/yzhuang/add_limiter_in_cluster_client
...
allow cluster client to use limiter
2020-05-21 09:12:59 +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
Yiwei Zhuang
5cd9e7f2f8
allow cluster client use limiter
2020-04-30 18:35:46 -07:00
Vladimir Mihailenco
218b17f0fc
Include multi & exec in pipeline hook
2020-02-14 15:55:16 +02:00
Vladimir Mihailenco
49a0c8c319
Add test for ring and cluster hooks
2020-02-14 14:30:40 +02:00
Vladimir Mihailenco
2e3402d33d
Don't allocate tmp slice in txPipelineWriteMulti
2020-02-14 12:55:59 +02:00
Vladimir Mihailenco
512e6c7a40
Unexport Clone and Lock from embedded hooks
2020-02-12 13:02:09 +02:00
git-hulk
d52b11cb42
Exported the setErr function as public
2020-02-03 17:53:47 +08:00
Vladimir Mihailenco
45de1c42ae
Set error on the commands in case there are no more attempts left
2020-02-02 14:17:14 +02:00
Vladimir Mihailenco
152e52f203
Fix WithContext race
2019-08-24 12:40:23 +03:00
Vladimir Mihailenco
2a46cb006d
Add withConn and set cmd errors more consistently
2019-08-09 13:53:05 +03:00
Vladimir Mihailenco
7779accbea
Use semantic import versioning
2019-08-08 14:29:44 +03:00
Vladimir Mihailenco
48224a399f
Remove releaseConnStrict
2019-08-08 11:44:55 +03:00