redis/CHANGELOG.md

98 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2018-07-22 14:23:04 +03:00
# Changelog
2020-09-05 17:39:26 +03:00
> :heart: [**Uptrace.dev** - distributed traces, logs, and errors in one place](https://uptrace.dev)
2020-09-14 13:28:01 +03:00
## v8
2020-05-26 12:05:26 +03:00
2020-09-11 15:52:38 +03:00
- Documentation at https://redis.uptrace.dev/
2020-06-10 15:04:12 +03:00
- All commands require `context.Context` as a first argument, e.g. `rdb.Ping(ctx)`. If you are not
2020-09-05 17:39:26 +03:00
using `context.Context` yet, the simplest option is to define global package variable
`var ctx = context.TODO()` and use it when `ctx` is required.
2020-09-17 12:58:09 +03:00
- Full support for `context.Context` canceling.
2020-09-11 15:52:38 +03:00
- Added `redis.NewFailoverClusterClient` that supports routing read-only commands to a slave node.
2020-09-05 17:39:26 +03:00
- Added `redisext.OpenTemetryHook` that adds
[Redis OpenTelemetry instrumentation](https://redis.uptrace.dev/tracing/).
2020-09-09 14:46:01 +03:00
- Redis slow log support.
2020-09-05 17:39:26 +03:00
- Ring uses Rendezvous Hashing by default which provides better distribution. You need to move
existing keys to a new location or keys will be inaccessible / lost. To use old hashing scheme:
```go
import "github.com/golang/groupcache/consistenthash"
ring := redis.NewRing(&redis.RingOptions{
NewConsistentHash: func() {
return consistenthash.New(100, crc32.ChecksumIEEE)
},
})
```
2020-09-11 11:24:38 +03:00
- `ClusterOptions.MaxRedirects` default value is changed from 8 to 3.
- `Options.MaxRetries` default value is changed from 0 to 3.
2020-09-09 14:46:01 +03:00
- `Cluster.ForEachNode` is renamed to `ForEachShard` for consistency with `Ring`.
2020-05-26 12:05:26 +03:00
## v7.3
2020-06-10 15:04:12 +03:00
- New option `Options.Username` which causes client to use `AuthACL`. Be aware if your connection
URL contains username.
2020-05-26 12:05:26 +03:00
## v7.2
2020-06-10 15:04:12 +03:00
- Existing `HMSet` is renamed to `HSet` and old deprecated `HMSet` is restored for Redis 3 users.
2020-02-22 12:02:03 +03:00
## v7.1
2020-06-10 15:04:12 +03:00
- Existing `Cmd.String` is renamed to `Cmd.Text`. New `Cmd.String` implements `fmt.Stringer`
interface.
2020-02-22 12:02:03 +03:00
2020-02-13 17:13:33 +03:00
## v7
2019-05-31 17:37:34 +03:00
2020-06-10 15:04:12 +03:00
- _Important_. Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a
transactional pipeline.
- WrapProcess is replaced with more convenient AddHook that has access to context.Context.
- WithContext now can not be used to create a shallow copy of the client.
2019-06-08 16:14:15 +03:00
- New methods ProcessContext, DoContext, and ExecContext.
- Client respects Context.Deadline when setting net.Conn deadline.
2020-06-10 15:04:12 +03:00
- Client listens on Context.Done while waiting for a connection from the pool and returns an error
when context context is cancelled.
- Add PubSub.ChannelWithSubscriptions that sends `*Subscription` in addition to `*Message` to allow
detecting reconnections.
- `time.Time` is now marshalled in RFC3339 format. `rdb.Get("foo").Time()` helper is added to parse
the time.
2020-02-02 12:09:27 +03:00
- `SetLimiter` is removed and added `Options.Limiter` instead.
- `HMSet` is deprecated as of Redis v4.
2019-05-31 17:37:34 +03:00
## v6.15
2018-09-11 13:09:16 +03:00
2020-06-10 15:04:12 +03:00
- Cluster and Ring pipelines process commands for each node in its own goroutine.
2018-09-11 13:09:16 +03:00
2018-08-23 16:15:29 +03:00
## 6.14
2018-08-12 10:08:21 +03:00
2018-08-12 10:42:00 +03:00
- Added Options.MinIdleConns.
- Added Options.MaxConnAge.
2018-08-12 10:08:21 +03:00
- PoolStats.FreeConns is renamed to PoolStats.IdleConns.
2018-08-12 11:11:01 +03:00
- Add Client.Do to simplify creating custom commands.
2020-06-10 15:04:12 +03:00
- Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers.
2018-08-23 16:15:29 +03:00
- Lower memory usage.
2018-08-12 10:08:21 +03:00
2018-07-22 14:23:04 +03:00
## v6.13
2020-06-10 15:04:12 +03:00
- Ring got new options called `HashReplicas` and `Hash`. It is recommended to set
`HashReplicas = 1000` for better keys distribution between shards.
- Cluster client was optimized to use much less memory when reloading cluster state.
- PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout
occurres. In most cases it is recommended to use PubSub.Channel instead.
2018-07-24 09:57:02 +03:00
- Dialer.KeepAlive is set to 5 minutes by default.
2018-07-22 14:23:04 +03:00
## v6.12
2020-06-10 15:04:12 +03:00
- ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis
Servers that don't have cluster mode enabled. See
https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup