|
1 |
| -## [8.11.4](https://github.com/go-redis/redis/compare/v8.11.3...v8.11.4) (2021-10-04) |
| 1 | +# [9.0.0-rc.2](https://github.com/go-redis/redis/compare/v9.0.0-rc.1...v9.0.0-rc.2) (2022-11-26) |
2 | 2 |
|
3 | 3 |
|
4 |
| -### Features |
5 |
| - |
6 |
| -* add acl auth support for sentinels ([f66582f](https://github.com/go-redis/redis/commit/f66582f44f3dc3a4705a5260f982043fde4aa634)) |
7 |
| -* add Cmd.{String,Int,Float,Bool}Slice helpers and an example ([5d3d293](https://github.com/go-redis/redis/commit/5d3d293cc9c60b90871e2420602001463708ce24)) |
8 |
| -* add SetVal method for each command ([168981d](https://github.com/go-redis/redis/commit/168981da2d84ee9e07d15d3e74d738c162e264c4)) |
9 |
| - |
10 |
| - |
11 |
| - |
12 |
| -## v8.11 |
13 |
| - |
14 |
| -- Remove OpenTelemetry metrics. |
15 |
| -- Supports more redis commands and options. |
16 |
| - |
17 |
| -## v8.10 |
18 |
| - |
19 |
| -- Removed extra OpenTelemetry spans from go-redis core. Now go-redis instrumentation only adds a |
20 |
| - single span with a Redis command (instead of 4 spans). There are multiple reasons behind this |
21 |
| - decision: |
22 |
| - |
23 |
| - - Traces become smaller and less noisy. |
24 |
| - - It may be costly to process those 3 extra spans for each query. |
25 |
| - - go-redis no longer depends on OpenTelemetry. |
26 |
| - |
27 |
| - Eventually we hope to replace the information that we no longer collect with OpenTelemetry |
28 |
| - Metrics. |
29 |
| - |
30 |
| -## v8.9 |
31 |
| - |
32 |
| -- Changed `PubSub.Channel` to only rely on `Ping` result. You can now use `WithChannelSize`, |
33 |
| - `WithChannelHealthCheckInterval`, and `WithChannelSendTimeout` to override default settings. |
34 |
| - |
35 |
| -## v8.8 |
36 |
| - |
37 |
| -- To make updating easier, extra modules now have the same version as go-redis does. That means that |
38 |
| - you need to update your imports: |
39 |
| - |
40 |
| -``` |
41 |
| -github.com/go-redis/redis/extra/redisotel -> github.com/go-redis/redis/extra/redisotel/v8 |
42 |
| -github.com/go-redis/redis/extra/rediscensus -> github.com/go-redis/redis/extra/rediscensus/v8 |
43 |
| -``` |
44 |
| - |
45 |
| -## v8.5 |
46 |
| - |
47 |
| -- [knadh](https://github.com/knadh) contributed long-awaited ability to scan Redis Hash into a |
48 |
| - struct: |
49 |
| - |
50 |
| -```go |
51 |
| -err := rdb.HGetAll(ctx, "hash").Scan(&data) |
| 4 | +### Bug Fixes |
52 | 5 |
|
53 |
| -err := rdb.MGet(ctx, "key1", "key2").Scan(&data) |
54 |
| -``` |
| 6 | +* capture error correctly in withConn ([d1bfaba](https://github.com/go-redis/redis/commit/d1bfaba549fe380d269c26cea0a0183ed1520a85)) |
| 7 | +* fixes ring.SetAddrs and rebalance race ([#2283](https://github.com/go-redis/redis/issues/2283)) ([d83436b](https://github.com/go-redis/redis/commit/d83436b321cd9ed52ba33c3edbe8f63bb0444c59)) |
| 8 | +* read in route_randomly query param correctly ([f236053](https://github.com/go-redis/redis/commit/f236053735d10aec5e6e31fc3ced1b2e53292554)) |
| 9 | +* reduce `SetAddrs` shards lock contention ([6c05a9f](https://github.com/go-redis/redis/commit/6c05a9f6b17f8e32593d3f7d594f82ba3dbcafb1)), closes [/github.com/go-redis/redis/pull/2190#discussion_r953040289](https://github.com//github.com/go-redis/redis/pull/2190/issues/discussion_r953040289) [#2077](https://github.com/go-redis/redis/issues/2077) |
| 10 | +* wrap cmds in Conn.TxPipeline ([5053db2](https://github.com/go-redis/redis/commit/5053db2f9c8b3ca25f497a75f70012c7ad6cd775)) |
55 | 11 |
|
56 |
| -- Please check [redismock](https://github.com/go-redis/redismock) by |
57 |
| - [monkey92t](https://github.com/monkey92t) if you are looking for mocking Redis Client. |
58 | 12 |
|
59 |
| -## v8 |
60 |
| - |
61 |
| -- All commands require `context.Context` as a first argument, e.g. `rdb.Ping(ctx)`. If you are not |
62 |
| - using `context.Context` yet, the simplest option is to define global package variable |
63 |
| - `var ctx = context.TODO()` and use it when `ctx` is required. |
64 |
| - |
65 |
| -- Full support for `context.Context` canceling. |
66 |
| - |
67 |
| -- Added `redis.NewFailoverClusterClient` that supports routing read-only commands to a slave node. |
68 |
| - |
69 |
| -- Added `redisext.OpenTemetryHook` that adds |
70 |
| - [Redis OpenTelemetry instrumentation](https://redis.uptrace.dev/tracing/). |
71 |
| - |
72 |
| -- Redis slow log support. |
73 |
| - |
74 |
| -- Ring uses Rendezvous Hashing by default which provides better distribution. You need to move |
75 |
| - existing keys to a new location or keys will be inaccessible / lost. To use old hashing scheme: |
76 |
| - |
77 |
| -```go |
78 |
| -import "github.com/golang/groupcache/consistenthash" |
79 |
| - |
80 |
| -ring := redis.NewRing(&redis.RingOptions{ |
81 |
| - NewConsistentHash: func() { |
82 |
| - return consistenthash.New(100, crc32.ChecksumIEEE) |
83 |
| - }, |
84 |
| -}) |
85 |
| -``` |
86 |
| - |
87 |
| -- `ClusterOptions.MaxRedirects` default value is changed from 8 to 3. |
88 |
| -- `Options.MaxRetries` default value is changed from 0 to 3. |
89 |
| - |
90 |
| -- `Cluster.ForEachNode` is renamed to `ForEachShard` for consistency with `Ring`. |
91 |
| - |
92 |
| -## v7.3 |
93 |
| - |
94 |
| -- New option `Options.Username` which causes client to use `AuthACL`. Be aware if your connection |
95 |
| - URL contains username. |
96 |
| - |
97 |
| -## v7.2 |
98 |
| - |
99 |
| -- Existing `HMSet` is renamed to `HSet` and old deprecated `HMSet` is restored for Redis 3 users. |
100 |
| - |
101 |
| -## v7.1 |
102 |
| - |
103 |
| -- Existing `Cmd.String` is renamed to `Cmd.Text`. New `Cmd.String` implements `fmt.Stringer` |
104 |
| - interface. |
| 13 | +### Features |
105 | 14 |
|
106 |
| -## v7 |
| 15 | +* add HasErrorPrefix ([d3d8002](https://github.com/go-redis/redis/commit/d3d8002e894a1eab5bab2c9fff13439527e330d8)) |
| 16 | +* add support for SINTERCARD command ([bc51c61](https://github.com/go-redis/redis/commit/bc51c61a458d1bc4fb4424c7c3e912325ef980cc)) |
107 | 17 |
|
108 |
| -- _Important_. Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a |
109 |
| - transactional pipeline. |
110 |
| -- WrapProcess is replaced with more convenient AddHook that has access to context.Context. |
111 |
| -- WithContext now can not be used to create a shallow copy of the client. |
112 |
| -- New methods ProcessContext, DoContext, and ExecContext. |
113 |
| -- Client respects Context.Deadline when setting net.Conn deadline. |
114 |
| -- Client listens on Context.Done while waiting for a connection from the pool and returns an error |
115 |
| - when context context is cancelled. |
116 |
| -- Add PubSub.ChannelWithSubscriptions that sends `*Subscription` in addition to `*Message` to allow |
117 |
| - detecting reconnections. |
118 |
| -- `time.Time` is now marshalled in RFC3339 format. `rdb.Get("foo").Time()` helper is added to parse |
119 |
| - the time. |
120 |
| -- `SetLimiter` is removed and added `Options.Limiter` instead. |
121 |
| -- `HMSet` is deprecated as of Redis v4. |
122 | 18 |
|
123 |
| -## v6.15 |
124 | 19 |
|
125 |
| -- Cluster and Ring pipelines process commands for each node in its own goroutine. |
| 20 | +## v9 UNRELEASED |
126 | 21 |
|
127 |
| -## 6.14 |
| 22 | +### Added |
128 | 23 |
|
129 |
| -- Added Options.MinIdleConns. |
130 |
| -- Added Options.MaxConnAge. |
131 |
| -- PoolStats.FreeConns is renamed to PoolStats.IdleConns. |
132 |
| -- Add Client.Do to simplify creating custom commands. |
133 |
| -- Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers. |
134 |
| -- Lower memory usage. |
| 24 | +- Added support for [RESP3](https://github.com/antirez/RESP3/blob/master/spec.md) protocol. |
| 25 | + Contributed by @monkey92t who has done a lot of work recently. |
| 26 | +- Added `ContextTimeoutEnabled` option that controls whether the client respects context timeouts |
| 27 | + and deadlines. See |
| 28 | + [Redis Timeouts](https://redis.uptrace.dev/guide/go-redis-debugging.html#timeouts) for details. |
| 29 | +- Added `ParseClusterURL` to parse URLs into `ClusterOptions`, for example, |
| 30 | + `redis://user:password@localhost:6789?dial_timeout=3&read_timeout=6s&addr=localhost:6790&addr=localhost:6791`. |
| 31 | +- Added metrics instrumentation using `redisotel.IstrumentMetrics`. See |
| 32 | + [documentation](https://redis.uptrace.dev/guide/go-redis-monitoring.html) |
135 | 33 |
|
136 |
| -## v6.13 |
| 34 | +### Changed |
137 | 35 |
|
138 |
| -- Ring got new options called `HashReplicas` and `Hash`. It is recommended to set |
139 |
| - `HashReplicas = 1000` for better keys distribution between shards. |
140 |
| -- Cluster client was optimized to use much less memory when reloading cluster state. |
141 |
| -- PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout |
142 |
| - occurres. In most cases it is recommended to use PubSub.Channel instead. |
143 |
| -- Dialer.KeepAlive is set to 5 minutes by default. |
| 36 | +- Removed asynchronous cancellation based on the context timeout. It was racy in v8 and is |
| 37 | + completely gone in v9. |
| 38 | +- Reworked hook interface and added `DialHook`. |
| 39 | +- Replaced `redisotel.NewTracingHook` with `redisotel.InstrumentTracing`. See |
| 40 | + [example](example/otel) and |
| 41 | + [documentation](https://redis.uptrace.dev/guide/go-redis-monitoring.html). |
| 42 | +- Replaced `*redis.Z` with `redis.Z` since it is small enough to be passed as value without making |
| 43 | + an allocation. |
| 44 | +- Renamed the option `MaxConnAge` to `ConnMaxLifetime`. |
| 45 | +- Renamed the option `IdleTimeout` to `ConnMaxIdleTime`. |
| 46 | +- Removed connection reaper in favor of `MaxIdleConns`. |
| 47 | +- Removed `WithContext` since `context.Context` can be passed directly as an arg. |
| 48 | +- Removed `Pipeline.Close` since there is no real need to explicitly manage pipeline resources and |
| 49 | + it can be safely reused via `sync.Pool` etc. `Pipeline.Discard` is still available if you want to |
| 50 | + reset commands for some reason. |
144 | 51 |
|
145 |
| -## v6.12 |
| 52 | +### Fixed |
146 | 53 |
|
147 |
| -- ClusterClient got new option called `ClusterSlots` which allows to build cluster of normal Redis |
148 |
| - Servers that don't have cluster mode enabled. See |
149 |
| - https://godoc.org/github.com/go-redis/redis#example-NewClusterClient--ManualSetup |
| 54 | +- Improved and fixed pipeline retries. |
| 55 | +- As usual, added more commands and fixed some bugs. |
0 commit comments