What Is New in Jedis 7.4
Jedis 7.4 delivers key enhancements focused on performance, new Redis command support, and developer experience. This release solidifies the client's capabilities for modern Redis deployments.
| Category | Key Changes |
|---|---|
| New Features | Support for ACL DRYRUN, CLIENT NO-TOUCH, and new JSON commands. |
| Performance | Reduced memory allocation and improved connection handling. |
| Bug Fixes | Resolved issues with connection retries, timeouts, and command parsing. |
| Deprecations | Deprecated the 'maxRedirections' parameter in favor of 'maxAttempts'. |
What new Redis commands are supported?
Jedis 7.4 adds support for several important Redis commands. This expands the client's coverage of the Redis API, allowing developers to leverage newer server features directly.
ACL and Client Management
The ACL DRYRUN command is now supported, which lets you test whether a user can execute a specific command without actually running it. This is great for building administrative tools. The CLIENT NO-TOUCH command is also included, preventing client connections from being reset by the server's idle timeout.
JSON Operations
Support for JSON commands has been extended with JSON.MERGE, JSON.MSET, and JSON.MGET. These batch operations make working with JSON documents more efficient by reducing network round trips.
How is connection and cluster handling improved?
Under-the-hood refinements make Jedis more robust and efficient in production environments. The focus was on connection lifecycle and cluster operation stability.
Connection retry logic has been hardened to better handle transient network issues. The internal handling of JedisCluster connections was optimized to reduce unnecessary resource allocation, which matters for long-running applications.
A notable change is the deprecation of the maxRedirections parameter in cluster methods. It's been replaced with the more intuitive maxAttempts parameter, which better reflects the actual operation of retrying a command across the cluster.
What performance optimizations were made?
This release includes targeted optimizations to reduce memory pressure and improve throughput. The changes are internal but contribute to a smoother runtime.
Memory allocation was reduced in several key areas, particularly in the command argument processing pipeline. For high-throughput applications, this can lead to less garbage collection overhead and more consistent performance.
The way connections are validated and reused was also tuned. This minimizes the overhead of establishing new connections to the Redis server, which is critical for applications with strict latency requirements.
FAQ
Is the deprecated 'maxRedirections' parameter going away soon?
It's deprecated but still functional in 7.4. You should migrate to using 'maxAttempts' in your JedisCluster code to avoid future breakage. The new parameter name is more accurate.
Does the new JSON.MSET command work with the RedisJSON module?
Yes, the newly supported JSON.MSET, JSON.MGET, and JSON.MERGE commands require the RedisJSON module to be installed on your Redis server. They provide batch operations for better efficiency.
What's the main use case for the ACL DRYRUN command?ACL DRYRUN is perfect for administrative UIs or validation scripts. It lets you check if a user has permission to run a command without actually executing it, which is safer for testing permissions.
Were there any fixes for connection timeouts?
Yes, several issues around connection timeout handling and retries were resolved. This makes the client more resilient in environments with intermittent network connectivity or during Redis server failovers.
Is there a breaking change I should be aware of when upgrading?
The only notable change is the deprecation of 'maxRedirections'. The API remains stable otherwise. It's a safe upgrade for most applications, but check your usage of that specific parameter.