Changelog from v3.0.1 and up. Prior changes don't have a changelog.
-
Fixed
NewCluster
not returning an error if it can't connect to any of the redis instances given. (#319) -
Fix deadlock in
Cluster
when usingDoSecondary
. (#317) -
Fix parsing for
CLUSTER SLOTS
command, which changed slightly with redis 7.0. (#322)
New
- Add
PoolMaxLifetime
option forPool
. (PR #294)
Fixes And Improvements
-
Switched to using
errors
package, rather thangolang.org/x/xerrors
. (PR #300) -
Switch to using Github Actions from travis. (PR #300)
-
Fixed IPv6 addresses breaking
Cluster
. (Issue #288)
- Release the RLock in
Sentinel
'sDo
. (PR #272)
New
-
Add
FallbackToUndelivered
option toStreamReaderOpts
. (PR #244) -
Add
ClusterOnInitAllowUnavailable
. (PR #247)
Fixes and Improvements
- Fix reading a RESP error into a
*interface{}
panicking. (PR #240)
New
-
Add
Tuple
type, which makes unmarshalingEXEC
andEVAL
results easier. -
Add
PersistentPubSubErrCh
, so that asynchronous errors withinPersistentPubSub
can be exposed to the user. -
Add
FlatCmd
method toEvalScript
. -
Add
StreamEntries
unmarshaler to make unmarshalingXREAD
andXREADGROUP
results easier.
Fixes and Improvements
-
Fix wrapped errors not being handled correctly by
Cluster
. (PR #229) -
Fix
PersistentPubSub
deadlocking when a method was called afterClose
. (PR #230) -
Fix
StreamReader
not correctly handling the case of reading from multiple streams when one is empty. (PR #224)
-
Improve docs for
WithConn
andPubSubConn
. -
Fix
PubSubConn
'sSubscribe
andPSubscribe
methods potentially mutating the passed in array of strings. (Issue #217) -
Fix
StreamEntry
not properly handling unmarshaling an entry with a nil fields array. (PR #218)
-
Add
EmptyArray
field toMaybeNil
. (PR #211) -
Fix
Cluster
not properly re-initializing itself when the cluster goes completely down. (PR #209)
Huge thank you to @nussjustin for all the work he's been doing on this project, this release is almost entirely his doing.
New
-
Add support for
TYPE
option toScanner
. (PR #187) -
Add
Sentinel.DoSecondary
method. (PR #197) -
Add
DialAuthUser
, to support username+password authentication. (PR #195) -
Add
Cluster.DoSecondary
method. (PR #198)
Fixes and Improvements
-
Fix pipeline behavior when a decode error is encountered. (PR #180)
-
Fix
Reason
inPoolConnClosed
in the case of the Pool being full. (PR #186) -
Refactor
PersistentPubSub
to be cleaner, fixing a panic in the process. (PR #185, Issue #184) -
Fix marshaling of nil pointers in structs. (PR #192)
-
Wrap errors which get returned from pipeline decoding. (PR #191)
-
Simplify and improve pipeline error handling. (PR #190)
-
Dodge a
[]byte
allocation when inStreamReader.Next
. (PR #196) -
Remove excess lock in Pool. (PR #202)
-
Fix alignment for atomic values in structs (PR #171)
-
Fix closing of sentinel instances while updating state (PR #173)
-
Update xerrors package (PR #165)
-
Have cluster Pools be closed outside of lock, to reduce contention during failover events (PR #168)
-
Add
PersistentPubSubWithOpts
function, deprecating the oldPersistentPubSub
function. (PR #156) -
Make decode errors a bit more helpful. (PR #157)
-
Refactor Pool to rely on its inner lock less, simplifying the code quite a bit and hopefully speeding up certain actions. (PR #160)
-
Various documentation updates. (PR #138, Issue #162)
- Have
resp2.Error
match with aresp.ErrDiscarded
when usingerrors.As
. Fixes EVAL, among probably other problems. (PR #152)
-
Use
xerrors
internally. (PR #113) -
Handle unmarshal errors better. Previously an unmarshaling error could leave the connection in an inconsistent state, because the full message wouldn't get completely read off the wire. After a lot of work, this has been fixed. (PR #127, #139, #145)
-
Handle CLUSTERDOWN errors better. Upon seeing a CLUSTERDOWN, all commands will be delayed by a small amount of time. The delay will be stopped as soon as the first non-CLUSTERDOWN result is seen from the Cluster. The idea is that, if a failover happens, commands which are incoming will be paused long enough for the cluster to regain it sanity, thus minimizing the number of failed commands during the failover. (PR #137)
-
Fix cluster redirect tracing. (PR #142)
New
-
Add
trace
package with tracing callbacks forPool
andCluster
. (Sentinel
coming soon!) (PR #100, PR #108, PR #111) -
Add
SentinelAddrs
method toSentinel
(PR #118) -
Add
DialUseTLS
option. (PR #104)
Fixes and Improvements
-
Fix
NewSentinel
not handling URL AUTH parameters correctly (PR #120) -
Change
DefaultClientFunc
's pool size from 20 to 4, on account of pipelining being enabled by default. (Issue #107) -
Reuse
reflect.Value
instances when unmarshaling into certain map types. (PR #96). -
Fix a panic in
FlatCmd
. (PR #97) -
Reuse field name
string
when unmarshaling into a struct. (PR #95) -
Reduce PubSub allocations significantly. (PR #92 + Issue #91)
-
Reduce allocations in
Conn
. (PR #84)
-
Optimize Scanner implementation.
-
Fix bug with using types which implement resp.LenReader, encoding.TextMarshaler, and encoding.BinaryMarshaler. The encoder wasn't properly taking into account the interfaces when counting the number of elements in the message.
-
Give Pool an ErrCh so that errors which happen internally may be reported to the user, if they care.
-
Fix
PubSubConn
's deadlock problems during Unsubscribe commands. -
Small speed optimizations in network protocol code.
- Move benchmarks to a submodule in order to clean up
go.mod
a bit.
-
Add
StreamReader
type to make working with redis' new Stream functionality easier. -
Make
Sentinel
properly respond toClient
method calls. Previously it always created a newClient
instance when a secondary was requested, now it keeps track of instances internally. -
Make default
Dial
call have a timeout for connect/read/write. At the same time, normalize default timeout values across the project. -
Implicitly pipeline commands in the default Pool implementation whenever possible. This gives a throughput increase of nearly 5x for a normal parallel workload.
- Add support for marshaling/unmarshaling structs.
- Make
Stub
supportPipeline
properly.