Commit Graph

2514 Commits

Author SHA1 Message Date
Vladimir Mihailenco c985686167 Merge pull request #418 from go-redis/fix/limit-alloc
Limit allocation.
2016-11-19 14:14:48 +02:00
Vladimir Mihailenco d3f9a9f91c Merge pull request #420 from freeformz/rediss
Add support for parsing redis:// and rediss:// URLs
2016-11-19 14:13:30 +02:00
Edward Muller df2009821f Default to secure
I suspect that many people will need InsecureSkipVerify:true though, but
that should be an explicit decision to expose security issues instead of
papering over them.
2016-11-16 10:35:35 -08:00
Edward Muller 4aa583b6f8 Updates based on PR feedback 2016-11-15 10:27:20 -08:00
Edward Muller 70eddf606d Place these tests behind a build tag
Sub test support doesn't work for go < 1.7
2016-11-14 09:40:12 -08:00
Edward Muller 019ff6eb38 Add support for parsing redis:// and rediss:// URLs
This includes setting up a default dialer that handles the ssl
handshake.
2016-11-14 08:50:05 -08:00
Vladimir Mihailenco 62cd3b38ef Limit allocation. 2016-11-09 10:13:03 +02:00
Vladimir Mihailenco b6bfe529a8 Merge pull request #416 from go-redis/fix/cluster-state
Use consistent cluster state when executing pipeline.
2016-11-08 12:04:23 +02:00
Vladimir Mihailenco 6324604106 Merge pull request #415 from go-redis/fix/govet
travis: run go vet
2016-11-08 11:50:33 +02:00
Vladimir Mihailenco 83208a1d9b Use consistent cluster state when executing pipeline. 2016-11-08 11:46:44 +02:00
Vladimir Mihailenco ae523dd552 travis: run go vet 2016-11-06 13:37:23 +02:00
Vladimir Mihailenco 80cf5d1652 Merge pull request #409 from bpiddubnyi/bugfix/setxx-zero-ex
Fix "invalid expire time in set" for SetXX with expiration = 0
2016-10-24 12:52:32 +03:00
Borys Piddubnyi cb63f1fd69 Add test for SetXX with expiration = 0 2016-10-21 17:14:51 +03:00
Borys Piddubnyi 50f1aff778 Fix "invalid expire time in set" for SetXX with expiration = 0 2016-10-21 15:40:53 +03:00
Vladimir Mihailenco 084336d5eb Merge pull request #407 from go-redis/fix/time-cmd
Fix/time cmd
2016-10-14 14:50:30 +03:00
Vladimir Mihailenco 3996289fe2 internal/proto: use read prefix to indicate that method reads from the stream. 2016-10-14 14:46:35 +03:00
Vladimir Mihailenco dcdf129dd5 Add TimeCmd. 2016-10-14 14:39:02 +03:00
Vladimir Mihailenco 6f8957c5b7 Update changelog. 2016-10-14 14:21:25 +03:00
Vladimir Mihailenco 24aa071f7c Merge pull request #406 from go-redis/fix/cmd-name-lowercase
Lowercase command name.
2016-10-14 10:42:20 +03:00
Vladimir Mihailenco a65b760eec Lowercase command name. 2016-10-14 10:37:30 +03:00
Vladimir Mihailenco 11137670ac Merge pull request #403 from go-redis/fix/rewrite-tx-using-pipeline
Refactor Tx using Pipeline to implement Cmdable interface.
2016-10-13 14:59:25 +03:00
Vladimir Mihailenco 20bc3ec5a6 Refactor Tx using Pipeline to implement Cmdable interface. 2016-10-13 14:36:15 +03:00
Vladimir Mihailenco 3490ff5d21 Merge pull request #402 from go-redis/fix/retry-multi-cmds-conservatively
Retry multiple commands more conservatively.
2016-10-13 14:05:44 +03:00
Vladimir Mihailenco 8558a92fa4 Retry multiple commands more conservatively. 2016-10-13 13:56:24 +03:00
Vladimir Mihailenco 589757464f Merge pull request #401 from go-redis/fix/simplify-sync
Simplify sync in pipeline.
2016-10-13 12:32:51 +03:00
Vladimir Mihailenco 8d2fb6e09b Simplify sync in pipeline. 2016-10-13 12:11:58 +03:00
Vladimir Mihailenco 21cae7f9ab Merge pull request #400 from yyoshiki41/refactor/cluster
simplify if condition
2016-10-13 12:10:37 +03:00
yyoshiki41 236c021d4c simplify if condition 2016-10-13 17:27:43 +09:00
Vladimir Mihailenco 11333cbc26 Merge pull request #397 from go-redis/feature/remove-forced-import
Remove static import
2016-10-12 15:51:27 +03:00
Dimitrij Denissenko e6d4f5bd38 Remove static import 2016-10-12 13:11:09 +01:00
Vladimir Mihailenco 0c5e085895 Update readme. 2016-10-09 12:02:30 +00:00
Vladimir Mihailenco cb3f27133f Merge pull request #394 from go-redis/fix/rm-errors-pack
Remove internal errors package that clashes with std lib.
2016-10-09 14:50:36 +03:00
Vladimir Mihailenco 2c5b239ecb Remove internal errors package that clashes with std lib. 2016-10-09 11:44:31 +00:00
Vladimir Mihailenco 97e6ccb3d8 Merge pull request #393 from go-redis/fix/cluster-testss
More cluster tests.
2016-10-09 14:37:19 +03:00
Vladimir Mihailenco 639950777c More cluster tests. 2016-10-09 11:27:38 +00:00
Vladimir Mihailenco fc0f357444 Merge pull request #392 from go-redis/fix/v5-prepare
Prepare v5 release.
2016-10-09 14:06:49 +03: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
Vladimir Mihailenco 5aae583e0c Merge pull request #391 from go-redis/fix/cluster-loading
Better cluster loading handling.
2016-10-09 11:36:11 +03:00
Vladimir Mihailenco 302cceb7a7 Merge pull request #381 from Unix4ever/allow-ring-shard-key-mapping
Add new parameter to the RingOptions to override CommandInfo first key
2016-10-09 11:24:45 +03:00
Vladimir Mihailenco fcf53a2a78 Better cluster loading handling. 2016-10-09 08:18:57 +00:00
Vladimir Mihailenco be32042426 Merge pull request #390 from lijunfei/v4
if readonly is open, read from master when slave is loading data
2016-10-09 10:56:35 +03:00
lijunfei 1b06f9351a define loading error 2016-10-09 11:44:58 +08:00
lijunfei 3cc9b99fb8 if readonly, read from master when slave is loading 2016-10-09 11:30:01 +08:00
Vladimir Mihailenco 6d51952d43 Merge pull request #389 from sugovsek/v4
Add missing argument to a `fmt.Errorf` call
2016-10-08 11:07:43 +03:00
Simon Ugovšek ce3447602f Add missing argument to a `fmt.Errorf` call 2016-10-07 15:41:03 +02:00
Vladimir Mihailenco c70ddf4531 Merge pull request #387 from yyoshiki41/refactor/clusterNode
Remove Addr field from clusterNode
2016-10-06 11:20:14 +03:00
yyoshiki41 84ae986659 Remove Addr field from clusterNode 2016-10-06 05:24:28 +09: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 5a272d03b9 Merge pull request #385 from go-redis/fix/enable-reaper-and-add-tests
Enable reaper on ClusterClient and add tests.
2016-10-02 16:00:31 +03:00