Changelog from v3.0.1 and up. Prior changes don't have a changelog.
-
Fixed
NewClusternot returning an error if it can't connect to any of the redis instances given. (#319) -
Fix deadlock in
Clusterwhen usingDoSecondary. (#317) -
Fix parsing for
CLUSTER SLOTScommand, which changed slightly with redis 7.0. (#322)
New
- Add
PoolMaxLifetimeoption forPool. (PR #294)
Fixes And Improvements
-
Switched to using
errorspackage, 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
FallbackToUndeliveredoption toStreamReaderOpts. (PR #244) -
Add
ClusterOnInitAllowUnavailable. (PR #247)
Fixes and Improvements
- Fix reading a RESP error into a
*interface{}panicking. (PR #240)
New
-
Add
Tupletype, which makes unmarshalingEXECandEVALresults easier. -
Add
PersistentPubSubErrCh, so that asynchronous errors withinPersistentPubSubcan be exposed to the user. -
Add
FlatCmdmethod toEvalScript. -
Add
StreamEntriesunmarshaler to make unmarshalingXREADandXREADGROUPresults easier.
Fixes and Improvements
-
Fix wrapped errors not being handled correctly by
Cluster. (PR #229) -
Fix
PersistentPubSubdeadlocking when a method was called afterClose. (PR #230) -
Fix
StreamReadernot correctly handling the case of reading from multiple streams when one is empty. (PR #224)
-
Improve docs for
WithConnandPubSubConn. -
Fix
PubSubConn'sSubscribeandPSubscribemethods potentially mutating the passed in array of strings. (Issue #217) -
Fix
StreamEntrynot properly handling unmarshaling an entry with a nil fields array. (PR #218)
-
Add
EmptyArrayfield toMaybeNil. (PR #211) -
Fix
Clusternot 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
TYPEoption toScanner. (PR #187) -
Add
Sentinel.DoSecondarymethod. (PR #197) -
Add
DialAuthUser, to support username+password authentication. (PR #195) -
Add
Cluster.DoSecondarymethod. (PR #198)
Fixes and Improvements
-
Fix pipeline behavior when a decode error is encountered. (PR #180)
-
Fix
ReasoninPoolConnClosedin the case of the Pool being full. (PR #186) -
Refactor
PersistentPubSubto 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
[]byteallocation 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
PersistentPubSubWithOptsfunction, deprecating the oldPersistentPubSubfunction. (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.Errormatch with aresp.ErrDiscardedwhen usingerrors.As. Fixes EVAL, among probably other problems. (PR #152)
-
Use
xerrorsinternally. (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
tracepackage with tracing callbacks forPoolandCluster. (Sentinelcoming soon!) (PR #100, PR #108, PR #111) -
Add
SentinelAddrsmethod toSentinel(PR #118) -
Add
DialUseTLSoption. (PR #104)
Fixes and Improvements
-
Fix
NewSentinelnot 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.Valueinstances when unmarshaling into certain map types. (PR #96). -
Fix a panic in
FlatCmd. (PR #97) -
Reuse field name
stringwhen 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.moda bit.
-
Add
StreamReadertype to make working with redis' new Stream functionality easier. -
Make
Sentinelproperly respond toClientmethod calls. Previously it always created a newClientinstance when a secondary was requested, now it keeps track of instances internally. -
Make default
Dialcall 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
StubsupportPipelineproperly.