Commit Graph

1670 Commits

Author SHA1 Message Date
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
Vladimir Mihailenco 7cbee9d337 Enable reaper on ClusterClient and add tests. 2016-10-02 12:44:01 +00:00
Vladimir Mihailenco a7d1d0b9ac Merge pull request #380 from go-redis/fix/pubsub-resubscribe
Simplify resubscribing in PubSub.
2016-09-29 15:51:14 +03:00
Vladimir Mihailenco e57ac63b6e Simplify resubscribing in PubSub. 2016-09-29 12:33:47 +00:00
Vladimir Mihailenco 833b0c68df Merge pull request #379 from Hepri/master
PubSub. Use appendIfNotExists instead of append for channels and patterns
2016-09-29 14:33:17 +03:00
Sergey Shcherbina 850045d6a6 Use appendIfNotExists instead of append. Fixed bug when connection loss to server leads to exponential grow of channels and patterns array in PubSub in every reconnect 2016-09-29 15:12:35 +05:00
Vladimir Mihailenco bb84d84aea Merge pull request #375 from go-redis/fix/cluster-without-nodes
Don't panic when cluster does not have valid nodes.
2016-09-27 12:38:15 +03:00
Vladimir Mihailenco ea5960170f Merge pull request #377 from go-redis/fix/cmdable-pipeline
Add Pipeline to Cmdable.
2016-09-27 12:36:54 +03:00
Vladimir Mihailenco 0b706418d9 Add Pipeline to Cmdable. 2016-09-27 09:29:21 +00:00
Vladimir Mihailenco 1c402b7989 Merge pull request #376 from evalphobia/feature/disable-cluster-idlecheck
Disable idle checks for cluster connection
2016-09-27 12:20:32 +03:00
evalphobia 8f5aeb7065 Disable idle checks for cluster connection 2016-09-27 14:13:33 +09:00
Vladimir Mihailenco c0b792a059 Don't panic when cluster does not have valid nodes. 2016-09-23 11:52:19 +00:00
Vladimir Mihailenco 938235994e Merge pull request #371 from go-redis/fix/try-go14-fix
Try to fix Go 1.4.
2016-09-14 14:04:51 +03:00
Vladimir Mihailenco db90f3638c Merge pull request #369 from rogerclotet/fix/cmdable-iface
Remove unexported functions from Cmdable interface
2016-09-14 14:00:50 +03:00
Vladimir Mihailenco 04cdc41cc4 Try to fix Go 1.4. 2016-09-14 11:00:34 +00:00
Roger Clotet 39333495f9 Remove unexported functions from Cmdable interface 2016-09-14 12:47:46 +02:00
Vladimir Mihailenco 1a0bda80bf Merge pull request #368 from go-redis/fix/cmdable-iface
Fix Cmdable interface.
2016-09-14 13:09:16 +03:00
Vladimir Mihailenco 73b28d0372 Fix Cmdable interface. 2016-09-14 10:01:56 +00:00
Vladimir Mihailenco 60d35dfc25 Merge pull request #366 from go-redis/fix/option-defaults
Set some sane default for every day usage.
2016-09-13 18:06:04 +03:00
Vladimir Mihailenco cea5c239f5 Set some sane default for every day usage. 2016-09-13 14:50:01 +00:00
Vladimir Mihailenco f69688538d Fix license. 2016-09-12 12:00:28 +00:00
Vladimir Mihailenco 4431d7c29e Merge pull request #365 from go-redis/fix/pool-queue
internal/pool: more idiomatic work with channels.
2016-09-12 09:21:30 +03:00
Vladimir Mihailenco 455abb1906 internal/pool: more idiomatic work with channels. 2016-09-12 06:15:59 +00:00
Vladimir Mihailenco 4b0862b5fd internal/pool: improve tests. 2016-09-10 14:09:39 +00:00
Vladimir Mihailenco 5f82b2acc7 Merge pull request #364 from go-redis/fix/reaper-close-conns
internal/pool: fix reaper to properly close connections.
2016-09-10 17:08:59 +03:00
Vladimir Mihailenco aab4e040c6 internal/pool: fix reaper to properly close connections. 2016-09-10 13:54:49 +00:00
Vladimir Mihailenco 788a36eee7 Merge pull request #361 from vkd/v4
fix iterator across empty pages
2016-09-08 16:48:19 +03:00
vkd cbf8ff22f5 fix comments 2016-09-08 16:40:45 +03:00
vkd 76c33da3ee fix iterator across empty pages 2016-09-08 16:07:49 +03:00
Vladimir Mihailenco 49f197e6d1 Merge pull request #356 from domodwyer/v4
Add Cmd constructors for testing/mock purposes.
2016-08-23 14:40:42 +03:00
Dom d07be2cd04 Add Cmd constructors for testing/mock purposes. 2016-08-22 21:20:49 +01:00
Vladimir Mihailenco 342961af9e Merge pull request #355 from go-redis/fix/geo-pos-rename
Fix/geo pos rename
2016-08-22 13:01:02 +03:00
Vladimir Mihailenco 559e13782c travis: test on Go 1.7. 2016-08-22 09:47:13 +00:00
Vladimir Mihailenco 8b7922d185 Add test for GeoPos. 2016-08-22 09:46:42 +00:00
Vladimir Mihailenco 235dc49d5f Rename GeoPosition to GeoPos for consistency with Redis Server. Simplify code where possible. 2016-08-22 09:39:22 +00:00
Vladimir Mihailenco 5e72ba7620 Merge pull request #354 from Hepri/feature/support-geopos
Support geopos command
2016-08-22 12:29:14 +03:00
Sergey Shcherbina ac1c5e46f9 support geopos command 2016-08-22 02:32:06 +05:00
Vladimir Mihailenco 909c26e76c Merge pull request #352 from jrmarkle/process_wrapper
add WrapProcess to allow users to alter command processing
2016-08-17 12:43:40 +03:00
Jamie Markle 5760a88db3 add WrapProcess 2016-08-15 15:22:50 -04:00
Vladimir Mihailenco 0b8675fa45 Merge pull request #350 from go-redis/fix/ring-heartbeat-frequency
ring: reduce HeartbeatFrequency.
2016-08-09 17:17:51 +03:00
Vladimir Mihailenco 66f2eb1584 ring: reduce HeartbeatFrequency. 2016-08-09 13:54:04 +00:00
Vladimir Mihailenco 1324657ba9 Merge pull request #347 from flisky/master
fix iterator for hscan/sscan/zscan
2016-08-04 17:44:18 +03:00
Yin Jifeng 91993128b0 fix iterator for hscan/sscan/zscan 2016-08-04 12:52:00 +08:00
Vladimir Mihailenco bc66ed0eba Merge pull request #344 from go-redis/fix/rename-commander
Rename Commander to Cmdable to match internal name.
2016-07-21 16:38:01 +03:00
Vladimir Mihailenco ff8419f643 Rename Commander to Cmdable to match internal name. 2016-07-21 13:24:58 +00:00