Commit Graph

40 Commits

Author SHA1 Message Date
monkey92t 8ad01240a4
Add support for resp3 protocol (#1739)
* support resp3 protocol

Signed-off-by: monkey <golang@88.com>

* Upgrade mod version limit go1.14

https://github.com/go-redis/redis/issues/1715#issuecomment-820685614

Signed-off-by: monkey <golang@88.com>

* Remove the redundant check of ReadReply

Signed-off-by: monkey <golang@88.com>

* fix the problem

Signed-off-by: monkey <golang@88.com>

* workflows add v9

Signed-off-by: monkey <golang@88.com>

* update StringStringMapCmd to MapStringStringCmd

Signed-off-by: monkey <golang@88.com>
2021-04-27 10:04:46 +03:00
monkey 4a7d03359b add miss Pipeline and TxPipeline
Signed-off-by: monkey <golang@88.com>
2021-03-07 17:34:40 +08:00
monkey 783725f3f7 fix ring test `supports Process hook` data race
Signed-off-by: monkey <golang@88.com>
2021-03-07 17:10:19 +08:00
monkey f4ae0ba02b solve possible unit test errors in ring_test.go
/redis/ring_test.go:560, Expected: <int>: 10, to equal: <int>: 9
/redis/ring_test.go:560, Expected: <int>: 1, to equal: <int>: 0

Signed-off-by: monkey <golang@88.com>
2021-02-25 11:43:41 +08:00
Vladimir Mihailenco 694e518a8c Use Rendezvous in Ring. Thanks @rafaeleyng for initial idea and implementation 2020-06-08 13:22:37 +03:00
Vladimir Mihailenco 073d805708 Fix build 2020-06-05 09:55:37 +03:00
Vladimir Mihailenco 558263e5eb Remove deprecated Ring options 2020-05-19 08:52:38 +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
Dirkjan Bussink 9a49a4d91d
Add client instantiation callback to allow more flexible configuration (#1281)
* Add NewClient to Ring options
2020-03-27 15:48:18 +02: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 dd4ef4e9cb Change Tx.Pipeline and Tx.TxPipeline meaning 2020-01-12 14:19:21 +02:00
Vladimir Mihailenco 7779accbea Use semantic import versioning 2019-08-08 14:29:44 +03:00
Michael Benford 9169633580 Add support for individual passwords for ring shards 2019-07-17 11:31:42 -03:00
Vladimir Mihailenco 2cbb5194fb Fix WithContext and add tests 2019-07-04 11:57:54 +03:00
Vladimir Mihailenco 8cc316035b Add GinkgoRecover 2019-06-16 14:47:24 +03:00
Vladimir Mihailenco 8476dfea4a Replace Wrap* with hooks that support context 2019-05-31 16:36:57 +03:00
Andrea Spacca 97e6ed8178 Ring instrumentantions (#1017)
* Ring instrumentantions
2019-04-24 09:33:36 +03:00
Andrea Spacca be4c4f3f38 Ring Watch (#1015)
* Ring Watch
2019-04-22 12:48:06 +03:00
Vladimir Mihailenco ea9da7c2e8 Rework ReceiveMessage 2018-07-23 17:10:58 +03:00
Vladimir Mihailenco f1ed2ad288 Add FlushDBAsync and FlushAllAsync 2017-06-17 12:53:16 +03:00
Felipe Cavalcanti eeb4d09198 rename Pipelineable to Pipeliner 2017-05-02 12:00:53 -03:00
Felipe Cavalcanti 6fca4d5ad0 pipeline now has its own interface "Pipelineable" 2017-05-01 12:42:58 -03:00
Vladimir Mihailenco 8040d63c4f Remove gopkg.in 2017-02-19 09:49:21 +02:00
Vladimir Mihailenco 639950777c More cluster tests. 2016-10-09 11:27:38 +00:00
Vladimir Mihailenco f5245efa73 Prepare v5 release. 2016-10-09 10:56:53 +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
Vladimir Mihailenco 66f2eb1584 ring: reduce HeartbeatFrequency. 2016-08-09 13:54:04 +00:00
Vladimir Mihailenco 38d30a4bab Use redis.v4 that is in alpha/beta state. 2016-04-09 13:27:16 +03:00
Vladimir Mihailenco 3b051d2374 Reuse single Pipeline type in Client, ClusterClient and Ring. 2016-04-09 10:47:15 +03:00
Vladimir Mihailenco 36487d8462 Stabilize build. 2015-12-22 12:08:35 +02:00
Vladimir Mihailenco b6b689904a Fix test. 2015-11-22 17:53:44 +02:00
Vladimir Mihailenco 98414ea72a Increase test timeout. 2015-11-21 10:20:01 +02:00
Vladimir Mihailenco 54dcf59909 ring: return an error in pipeline when all shards are down. 2015-07-13 12:56:16 +03:00
Vladimir Mihailenco 1608a33e55 ring: fix key hashing in Ring pipeline. 2015-06-24 15:37:41 +03:00
Vladimir Mihailenco fee949ecbf ring: improve pipelining tests. 2015-06-24 13:41:50 +03:00
Vladimir Mihailenco 0cf1b73698 Add RingPipeline. 2015-06-04 11:50:24 +03:00
Vladimir Mihailenco 46f49a17a5 Add Redis Ring. 2015-06-03 14:25:52 +03:00