Latest Pre-release in branch 5.3
5.3.0-beta1
Released 20 Dec 2024
(1 year ago)
SoftwareJedis
Version5.3
Latest release5.3.0-beta1
20 Dec 2024
(1 year ago)
Release noteshttps://github.com/redis/jedis/releases/tag/v5.3.0-beta1
Source codehttps://github.com/redis/jedis/tree/v5.3.0-beta1
Documentationhttps://github.com/redis/jedis/wiki
Downloadhttps://mvnrepository.com/artifact/redis.clients/jedis/5.3.0-beta1
Jedis 5.3 ReleasesView full list

What Is New in Jedis 5.3

Jedis 5.3 delivers key enhancements for Redis connectivity, focusing on new commands, improved cluster support, and essential bug fixes. This update keeps the client aligned with the latest Redis server capabilities.

Category Key Changes
New Features Support for ACL DRYRUN, CLIENT NO-TOUCH, ASKING, and LMOVE/BLMOVE with multiple directions.
Cluster Support ASK redirection handling and support for the new CLUSTER LINKS command.
Bug Fixes Addresses issues with connection validation, URI parsing, and pipeline execution.
Deprecations Methods for the deprecated ZRANGEBYSCORE command are now marked for removal.

What new Redis commands does Jedis 5.3 support?

Jedis 5.3 adds support for several important Redis commands. The ACL DRYRUN command allows testing user permissions without executing the actual command, which is great for validating security rules.

It also implements CLIENT NO-TOUCH to prevent resetting a client's idle time and adds the ASKING command for cluster handling. For list operations, the library now supports LMOVE and BLMOVE with all four direction combinations (LEFT|RIGHT, RIGHT|LEFT).

// Example using ACL DRYRUN
jedis.aclDryRun("user1", "get", "key1");

// Example using LMOVE with directions
jedis.lmove("srcList", "destList", ListDirection.LEFT, ListDirection.RIGHT);

How does Jedis 5.3 improve Redis Cluster support?

The cluster client now properly handles ASK redirection, a crucial mechanism for Redis Cluster when a key has moved to a different node during a resharding operation. This makes the client more robust during cluster maintenance.

Support for the new CLUSTER LINKS command has also been added, providing visibility into the internode connections within your cluster. This is useful for debugging and monitoring cluster health.

What critical bugs were fixed in this release?

Several important stability issues were resolved. The connection validation logic was fixed to prevent premature closure of connections, which could cause unexpected errors in pooled environments.

A bug in the URI parsing for Redis Sentinel configurations was patched, ensuring proper connection establishment. Another fix addressed an issue where pipelined commands could fail to execute correctly under certain conditions.

What functionality is being deprecated?

Methods related to the ZRANGEBYSCORE command, which has been deprecated in Redis, are now officially marked as deprecated in Jedis. You should migrate to using ZRANGE with the BYSCORE argument instead.

In practice, this means updating your sorted set queries. The old method will still work for now but will be removed in a future major version.

// Deprecated approach
jedis.zrangeByScore("zset", 0, 100);

// New approach
jedis.zrange("zset", ZRangeParams.zrangeByScore(0, 100));

FAQ

Does Jedis 5.3 require a specific Redis server version?
While it works with older versions, to use new commands like ACL DRYRUN or CLUSTER LINKS, you need Redis 6.2 or newer. Always check the Redis command documentation for version requirements.

How do I handle the deprecated ZRANGEBYSCORE methods?
Replace calls to zrangeByScore and similar methods with zrange using ZRangeParams.zrangeByScore(). This future-proofs your code for the next major release.

What's the practical benefit of the CLIENT NO-TOUCH command?
It prevents a client's idle time from being reset when you just want to check its state. This is useful for monitoring scripts that shouldn't interfere with connection pool eviction policies.

Is the ASK redirection handling automatic?
Yes, the Jedis cluster client now automatically handles ASK redirection transparently, so your application code doesn't need manual logic for this cluster scenario.

Were there any connection leak fixes?
Yes, the fix for connection validation helps prevent scenarios where connections might be incorrectly returned to the pool in an invalid state, which could lead to connection leaks over time.

Releases In Branch 5.3

VersionRelease date
5.3.0-beta120 Dec 2024
(1 year ago)