- Fix the sentinel client to properly extend timeout for blocking commands.
- Fix IPv6 support in
RedisClient::Config#server_url
.
- Fix
ProtocolError: Unknown sigil type
errors when using SSL connection. See #190.
- Made various performance optimizations to the Ruby driver. See #184.
- Always assume UTF-8 encoding instead of relying on
Encoding.default_external
. - Add
exception
flag inpipelined
allowing failed commands to be returned in the result array when set tofalse
. See #187.
- Handle unresolved Sentinel master/replica error when displaying server URL in exceptions. See #182.
- Include redis server URL in most error messages. See #178.
- Close Redis Sentinel connection after resolving role. See #176.
- Accept
unix://
schemes as well as simple paths in theurl:
config parameter. #170. - Make basic usage Ractor compatible.
- Fixed a bug in
hiredis-client
that could cause a crash if interrupted byTimeout.timeout
or otherThread#raise
based mecanism. - Fixed a GC bug that could cause crashes in
hiredis-client
.
- Revalidate connection in
RedisClient#connected?
- Eagerly fail if
db:
isn't an Integer. #151.
- Expose more connection details such as
host
,db
, etc onRedisClient
.
- Add support for
NaN
in RESP3 protocol doubles. This was initially missing from the spec and added about a year ago.
- Adds
sentinel_username
andsentinel_password
options forRedisClient#sentinel
- Add
RedisClient#disable_reconnection
. - Reverted the special discard of connection. A regular
close(2)
should be enough.
- Discard sockets rather than explictly close them when a fork is detected. #126.
- Allow to configure sentinel client via url. #117.
- Fix sentinel to preverse the auth/password when refreshing the sentinel list. #107.
- Include the timeout value in TimeoutError messages.
- Fix connection keep-alive on FreeBSD. #102.
- Implement Sentinels list automatic refresh.
- hiredis binding now implement GC compaction and write barriers.
- hiredis binding now properly release the GVL around
connect(2)
. - hiredis the client memory is now re-used on reconnection when possible to reduce allocation churn.
- Enable TCP keepalive on redis sockets. It sends a keep alive probe every 15 seconds for 2 minutes. #94.
- Cache calls to
Process.pid
on Ruby 3.1+. #91.
- Improve compatibility with
uri 0.12.0
(default in Ruby 3.2.0).
- hiredis: fix a compilation issue on macOS and Ruby 3.2.0. See: #79
- Close connection on MASTERDOWN errors. Similar to READONLY.
- Add a
circuit_breaker
configuration option for cache servers and other disposable Redis servers. See #55 / #70
- Close connection on READONLY errors. Fix: #64
- Handle Redis 6+ servers with a missing HELLO command. See: #67
- Validate
url
parameters a bit more strictly. Fix #61
- hiredis: Workaround a compilation bug with Xcode 14.0. Fix: #58
- Accept
URI
instances asuri
parameter.
- hiredis: do not eagerly close the connection on read timeout, let the caller decide if a timeout is final.
- Add
Config#custom
to store configuration metadata. It can be used for per server middleware configuration.
- Added instance scoped middlewares. See: #53
- Allow subclasses of accepted types as command arguments. Fix: #51
- Improve hiredis driver error messages.
- Automatically reconnect if the process was forked.
- Make the client resilient to
Timeout.timeout
orThread#kill
use (it still is very much discouraged to use either). Use of async interrupts could cause responses to be interleaved. - hiredis: handle commands returning a top-level
false
(no command does this today, but some extensions might). - Workaround a bug in Ruby 2.6 causing a crash if the
debug
gem is enabled whenredis-client
is being required. Fix: #48
- Add a
connect
interface to the instrumentation API.
- Properly parse script errors on pre 7.0 redis server.
- Fix a bug in
url
parsing conflicting with thepath
option.
- Raise a distinct
RedisClient::OutOfMemoryError
, for RedisOOM
errors. - Fix the instrumentation API to be called even for authentication commands.
- Fix
url:
configuration to accept a trailing slash.
- Fix
#pubsub
being called when reconnection is disabled (redis-rb compatibility fix).
- Sentinel config now accept a list of URLs:
RedisClient.sentinel(sentinels: %w(redis://example.com:7000 redis://example.com:7001 ..))
- Fix sentinel to not connected to s_down or o_down replicas.
- Fix
REDIS_REPLY_SET
parsing inhiredis
.
- Added
protocol: 2
options to talk with Redis 5 and older servers. - Added
_v
versions ofcall
methods to make it easier to pass commands as arrays without splating. - Fix calling
blocking_call
with a block in a pipeline. blocking_call
now raiseReadTimeoutError
if the command didn't complete in time.- Fix
blocking_call
to not respectretry_attempts
on timeout. - Stop parsing RESP3 sets as Ruby Set instances.
- Fix
SystemStackError
when parsing very large hashes. Fix: #30 hiredis
now more properly release the GVL when doing IOs.
- Fix a regression in the
scan
familly of methods, they would raise withArgumentError: can't issue an empty redis command
. Fix: #24
- Fix handling of connection URLs with empty passwords (
redis://:pass@example.com
). - Handle URLs with IPv6 hosts.
- Add
RedisClient::Config#server_url
as a quick way to identify which server the client is pointing to. - Add
CommandError#command
to expose the command that caused the error. - Raise a more explicit error when connecting to older redises without RESP3 support (5.0 and older).
- Properly reject empty commands early.
- The
hiredis
driver have been moved to thehiredis-client
gem.
hiredis
is now the default driver when available.- Add
RedisClient.default_driver=
. #call
now takes an optional block to cast the return value.- Treat
#call
keyword arguments as Redis flags. - Fix
RedisClient#multi
returning some errors as values instead of raising them.
- Use a more robust way to detect the current compiler.
- Added
RedisClient.register
as a public instrumentation API. - Fix
read_timeout=
andwrite_timeout=
to apply even when the client or pool is already connected. - Properly convert DNS resolution errors into
RedisClient::ConnectionError
. Previously it would raiseSocketError
- Initial Release