Commit Graph

44 Commits

Author SHA1 Message Date
Vladimir Mihailenco 02ccf05ed0 Close the conn on context timeout 2020-12-06 11:14:07 +02:00
Vladimir Mihailenco b657760cca Tweak number of retries 2020-09-11 12:13:27 +03:00
Vladimir Mihailenco 457cdea58f Fix build 2020-09-09 17:40:37 +03:00
Dmitry Shmulevich 7597d0def7 use 3 sentinel instances in unit testing
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
2020-09-03 12:11:56 -07:00
Vladimir Mihailenco 21a1f58caf Retry timeout and retryable error 2020-07-24 15:52:15 +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 49a0c8c319 Add test for ring and cluster hooks 2020-02-14 14:30:40 +02:00
jskelcy c2e92153ba properly point redisServerConf to redis.conf 2019-12-05 14:28:33 -05:00
Vladimir Mihailenco eaeb8f2a08 internal: return an error on setting deadline 2019-08-16 17:50:57 +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 6c72dc807e internal/pool: replace atomic.Value with int64 2019-06-01 11:32:05 +03:00
Vladimir Mihailenco 00de347403 Optimize reading big values 2018-08-16 14:01:03 +03:00
Vladimir Mihailenco 2559f32464 cluster: optimize newClusterState 2018-07-22 14:17:42 +03:00
Vladimir Mihailenco 1f59be5cc0 cluster: add manual setup 2018-06-29 10:46:12 +03:00
Vladimir Mihailenco 11ca0e65c6 Add race test for BLPop 2018-03-08 10:16:53 +02:00
Vladimir Mihailenco 5294b5dae1 Add PoolStats.StaleConns and enable logging by default 2017-09-11 09:10:17 +03:00
Vladimir Mihailenco dbd2c99ba9 Rework pipeline retrying 2017-09-01 14:56:00 +03:00
Vladimir Mihailenco 0d94a7bc88 Fix race in PubSub 2017-06-29 17:09:52 +03:00
Vladimir Mihailenco fbc8000fd1 Resent client pool when sentinel switches master 2017-06-29 16:53:49 +03:00
Vladimir Mihailenco 8040d63c4f Remove gopkg.in 2017-02-19 09:49:21 +02:00
Vladimir Mihailenco b4efc45f1c Set read/write timeouts more consistently. 2016-12-03 17:30:13 +02:00
Vladimir Mihailenco f5245efa73 Prepare v5 release. 2016-10-09 10:56:53 +00:00
Vladimir Mihailenco eeba1d7db1 Select random node when there are no keys. 2016-10-09 10:30:45 +00:00
Artem Chernyshev 03da66c18a Add new parameter to the RingOptions to override CommandInfo first key
There is problem with `eval` and `evalsha` commands.
`COMMAND INFO eval` returns first key position equals `0`.
After that, redis ring chooses `eval` as a value for sharding.
They, if you try to delete created value, ring may choose another shard
and delete won't work.

Eval command should be parsed, to be sharded properly, according to
redis specs: http://redis.io/commands/command .

I've introduced a new flag in the `RingOptions`, which will enable new
behavior: `EnableKeyLocationParsing`.

If it is enabled, `cmdFirstKey` will try to get key position using
`cmd.getFirstKeyPos()`. This function is defined for `eval` and
`evalsha` commands.
If it has parameters, it will return `3`, otherwise it will return `0`.
2016-10-04 17:09:04 +03:00
Vladimir Mihailenco 7cbee9d337 Enable reaper on ClusterClient and add tests. 2016-10-02 12:44:01 +00:00
Dimitrij Denissenko 7d856c5595 Make proto/parser an internal package 2016-07-02 13:52:10 +01:00
Vladimir Mihailenco 38d30a4bab Use redis.v4 that is in alpha/beta state. 2016-04-09 13:27:16 +03:00
Vladimir Mihailenco 6e1aef39ea Faster and simpler pool. 2016-03-19 11:49:13 +02:00
Vladimir Mihailenco f47fb47df0 Extract race tests to separate file. Add more race tests. 2016-03-16 19:45:35 +02:00
Vladimir Mihailenco 46790aa060 Add race test for big vals. Copy connection to avoid race with PubSub. 2016-03-14 16:34:15 +02:00
Dimitrij Denissenko e80f790e76 Use go standard path for test data 2016-03-12 10:25:59 +00:00
Vladimir Mihailenco 27635bbe4e Fix FailoverClient to close connection to Sentinel. Fixes races build. 2016-03-09 15:14:01 +02:00
Vladimir Mihailenco 110e93a8e4 Simplify connection management with sticky connection pool. Fixes #260. 2016-03-01 14:12:25 +02:00
Vladimir Mihailenco 36487d8462 Stabilize build. 2015-12-22 12:08:35 +02:00
Vladimir Mihailenco a242fa7027 Try to make cluster tests more stable. 2015-11-14 15:55:01 +02:00
Vladimir Mihailenco 25164333ff Fix pool panic on slow connection with MaxRetries > 0. 2015-10-13 12:10:04 +03:00
Vladimir Mihailenco 9987f2abaa Add PubSub.ReceiveMessage. 2015-09-06 13:54:04 +03:00
Vladimir Mihailenco a8fe55571b pool: put connection to the list before returning it. 2015-06-03 16:45:46 +03:00
Vladimir Mihailenco 46f49a17a5 Add Redis Ring. 2015-06-03 14:25:52 +03:00
Vladimir Mihailenco bca8659b54 Run tests against latest Redis version. 2015-05-18 14:44:40 +03:00
Vladimir Mihailenco 18ea75d2ad Release redis.v3 beta. 2015-05-14 16:24:19 +03:00
Vladimir Mihailenco 1078a303ea sentine: don't pass DB and Password to Sentinel client. 2015-05-14 16:13:45 +03:00