- Allow
nilas a valid value for the:passwordstart option again. v0.11.0 broke this feature.
- Use the new Telemetry event conventions for pipeline-related events. The new events are
[:redix, :pipeline, :start]and[:redix, :pipeline, :stop]. They both have new measurements associated with them. - Remove the
[:redix, :reconnection]Telemetry event in favor or[:redix, :connection], which is emitted anytime there's a successful connection to a Redis server. - Remove support for the deprecated ``:log` start option (which was deprecated on v0.10.0).
- Add the
:connection_metadataname to all connection/disconnection-related Telemetry events. - Allow a
{module, function, arguments}tuple as the value of the:passwordstart option. This is useful to avoid password leaks in case of process crashes (and crash reports). - Bump minumum Elixir requirement to Elixir
~> 1.7.
- Fix a crash in
Redix.PubSubwhen non-subscribed processes attempted to unsubscribe.
- Fix a bug that caused a memory leak in some cases for Redix pub/sub connections.
- Fix default option replacement for SSL in OTP 22.2.
- Allow
:gen_statem.start_link/3,4options inRedix.start_link/2andRedix.PubSub.start_link/2. - Change default SSL depth from 2 to 3 (see this issue).
- Fix the default Telemetry handler for Redis Sentinel events (wasn't properly fixed in v0.10.3).
- Fix a compile-time warning about the castore library.
- Use more secure SSL default options and optionally use castore if available as a certificate store.
- Fix the default Telemetry handler for Redis Sentinel events.
- Allow a discarded username when using Redis URIs.
- Fix the
Redix.command/0type which was[binary()]but which should have been[String.Chars.t()]since we callto_string/1on each command.
- Improve password checking in Redis URIs.
- Fix a bug when naming Redix connections with something other than a local name.
- Add support for Telemetry and publish the following events:
[:redix, :pipeline],[:redix, :pipeline, :error],[:redix, :disconnection],[:redix, :reconnection],[:redix, failed_connection]. - Deprecate the
:logoption inRedix.start_link/1andRedix.PubSub.start_link/1in favour of Telemetry events and a default log handler that can be activated withRedix.Telemetry.attach_default_handler/0. See the documentation forRedix.Telemetry. This is a hard deprecation that shows a warning. Support for the:logoption will be removed in the next version. - Fix a few minor bugs in
Redix.PubSub.
- Fix a bug related to quickly reconnecting PIDs in
Redix.PubSub. - Improve error messages here and there.
- Add support for URLs with the
redissscheme. - Fix a bug where we used the wrong logging level in some places.
- Fix a bad return type from a
gen_statemcallback (#120). - Improve logging for Redis Sentinel.
-
Bring
Redix.PubSubinto Redix. Pub/Sub functionality lived in a separate library, redix_pubsub. Now, that functionality has been moved into Redix. This means that if you use redix_pubsub and upgrade your Redix version to 0.9, you will use the redix_pubsub version ofRedix.PubSub. If you also upgrade your redix_pubsub version, redix_pubsub will warn and avoid compilingRedix.PubSubso you can use the latest version in Redix. In general, if you upgrade Redix to 0.9 or later just drop the redix_pubsub dependency and make sure your application works with the latestRedix.PubSubAPI (the message format changed slightly in recent versions). -
Add support for Redis Sentinel.
-
Don't raise
Redix.Errorerrors on non-bang variants of functions. This means that for exampleRedix.command/3won't raise aRedix.Errorexception in case of Redis errors (like wront typing) and will return that error instead. In general, if you're pattern matching on{:error, _}to handle connection errors (for example, to retry after a while), now specifically match on{:error, %Redix.ConnectionError{}}. If you want to handle all possible errors the same way, keep matching on{:error, _}.
- Fix a bug that wouldn't let you use Redis URIs without host or port.
- Don't ignore the
:timeoutoption when connecting to Redis.
- Fix an error when setting up SSL buffers (#106).
- Re-introduce
start_link/2with two lists of options, but deprecate it. It will be removed in the next Redix version.
-
Drop support for Elixir < 1.6.
-
Unify
start_linkoptions: there's no more separation between "Redis options" and "connection options". Now, all the options are passed in together. You can still pass a Redis URI as the first argument. This is a breaking change because now callingstart_link/2with two kewyord lists breaks. Note thatstart_link/2with two keyword lists still works, but emits a warning and is deprecated.
-
Rewrite the connection using
gen_statemin order to drop the dependency to Connection. -
Add
Redix.transaction_pipeline/3andRedix.transaction_pipeline!/3. -
Use a timeout when connecting to Redis (which sometimes could get stuck).
-
Add support for SSL 🔐
-
Add
Redix.noreply_command/3andRedix.noreply_pipeline/3(plus their bang!variants).
- Add support for Unix domain sockets by passing
host: {:local, path}.
-
Drop support for Elixir < 1.3.
-
Remove
Redix.format_error/1.
- Add
Redix.child_spec/1for use with the child spec changes in Elixir 1.5.
- Fix some deprecation warnings around
String.to_char_list/1.
- Start using
Redix.ConnectionErrorwhen returning errors instead of just an atom. This is a breaking change since nowRedix.command/2and the other functions return{:error, %Redix.ConnectionError{reason: reason}}instead of{:error, reason}. If you're matching on specific error reasons, make sure to update your code; if you're formatting errors throughRedix.format_error/1, you can now useException.message/1on theRedix.ConnectionErrorstructs.
- Fix some TCP error handling during the connection setup phase.
- Fix
Redix.stop/1to be synchronous and not leave zombie processes.
- Drop support for Elixir < 1.2 and OTP 17 or earlier.
-
Add @lexmag to the maintainers 🎉
-
Handle timeouts nicely by returning
{:error, :timeout}instead of exiting (which is the defaultGenServerbehaviour). -
Remove support for specifying a maximum number of reconnection attempts when connecting to Redis (it was the
:max_reconnection_attemptsoption). -
Use exponential backoff when reconnecting.
-
Don't reconnect right away after the connection to Redis is lost, but wait for a cooldown time first.
-
Add support for
:backoff_initialand:backoff_maxoptions inRedix.start_link/2. These options are used for controlling the backoff behaviour of aRedixconnection. -
Add support for the
:sync_connectoption when connecting to Redis. -
Add support for the
:exit_on_disconnectionoption when connecting to Redis. -
Add support for the
:logoption when connecting to Redis. -
Raise
ArgumentErrorexceptions instead ofRedix.ConnectionErrorexceptions for stuff like empty commands. -
Raise
Redix.Errorexceptions fromRedix.command/3instead of returning them wrapped in{:error, _}. -
Expose
Redix.format_error/1. -
Add a "Reconnections" page in the documentation.
-
Extract the Pub/Sub functionality into a separate project.
- Fixed a bug in the integer parsing in
Redix.Protocol.
-
Redix.Protocolnow uses continuations under the hood for a faster parsing experience. -
A bug in
Redix.Protocolthat caused massive memory leaks was fixed. This bug originated upstream in Elixir itself, and I submitted a fix for it here. -
Some improvements were made to error reporting in the Redix logging.
- Fix a bug in the connection that was replacing the provided Redis password with
:redactedupon successful connection, making it impossible to reconnect in case of failure (because of the original password now being unavailable).
- Fix basically the same bug that was almost fixed in
v0.3.2, but this time for real!
- Fix a bug in the protocol that failed to parse integers in some cases.
- Restructure the Redix architecture to use two Elixir processes per connection instead of one (a process that packs commands and sends them on the socket and a process that listens from the socket and replies to waiting clients); this should speed up Redix when it comes to multiple clients concurrently issueing requests to Redis.
-
Change the behaviour for an empty list of command passed to
Redix.pipeline/2(Redix.pipeline(conn, [])), which now raises aRedix.ConnectionErrorcomplaining about the empty command. Before this release, the behaviour was just a connection timeout. -
Change the behaviour of empty commands passed to
Redix.command/2orRedix.pipeline/2(for example,Redix.command(conn, [])orRedix.pipeline(conn, [["PING"], []])); empty commands now return{:error, :empty_command}. The previous behaviour was just a connection timeout. -
Remove
Redix.start_link/1in favour of justRedix.start_link/2: now Redis options are separated from the connection options. Redis options can be passed as a Redis URI as well.
- Change the error messages for most of the
Redix.ConnectionErrorexceptions from simple atoms to more meaningful messages.
- Fix a bug with single-element lists, that were parsed as single elements (and not lists with a single element in them) by
Redix.Protocol.parse_multi/2. See whatyouhide/redix#11.
-
Rename
Redix.NetworkErrortoRedix.ConnectionError(as it's more generic and more flexible). -
Add support for PubSub. The following functions have been added to the
Redixmodule:Redix.subscribe/4Redix.subscribe!/4Redix.psubscribe/4Redix.psubscribe!/4Redix.unsubscribe/4Redix.unsubscribe!/4Redix.punsubscribe/4Redix.punsubscribe!/4Redix.pubsub?/2
Initial release.