What Is New in Jedis 2.10
Jedis 2.10 introduces critical updates focused on Redis 7 compatibility, performance enhancements, and important bug fixes. This release ensures the client stays current with the latest Redis server capabilities.
| Category | Key Changes |
|---|---|
| New Features | Support for Redis 7.0, SHUTDOWN semantics, CLIENT NO-EVICT command. |
| Improvements | Reduced memory usage, enhanced CLUSTER SLOTS parsing, better error messages. |
| Bug Fixes | Connection and pipeline issues, SSL handshake fixes, cluster command routing. |
| Deprecations | Deprecated `maxRedirections` parameter in cluster commands. |
How does Jedis 2.10 handle Redis 7.0 features?
This release adds foundational support for Redis 7.0. The main addition is the CLIENT NO-EVICT
command, which gives applications more control over client eviction policies when the server is under memory
pressure.
It also properly implements the new SHUTDOWN command semantics introduced in Redis 7.0.2. This
matters because it ensures a clean and controlled shutdown process when interacting with newer Redis servers.
What performance and memory improvements were made?
Memory usage was significantly reduced for the JedisCluster and
JedisSlotBasedConnectionHandler classes. This is a welcome change for applications managing large
numbers of cluster connections.
The parsing logic for the CLUSTER SLOTS command output was also improved. This enhancement makes
cluster topology discovery more efficient and robust, which directly benefits applications that scale
horizontally across a Redis cluster.
Which critical bugs were squashed in this release?
Several connection and pipeline-related issues were resolved. A notable fix prevents a potential
ClassCastException when using the PipelineBase class, which could previously cause
unexpected application crashes.
SSL handshake problems and cluster command routing bugs were also addressed. These fixes improve the overall stability and reliability of Jedis in production environments, especially for secure and clustered deployments.
Is anything being deprecated that I should know about?
Yes, the maxRedirections parameter used in various cluster commands has been officially deprecated.
You should start updating your code to use the newer, preferred method for handling command redirections in a
cluster.
In practice, this means moving away from method signatures that include this parameter. The deprecation warns you to future-proof your code against its eventual removal in a later major version.
FAQ
Do I need to upgrade my Redis server to use Jedis 2.10?
No, Jedis 2.10 maintains backward
compatibility. You can use it with older Redis servers, but you'll need Redis 7.0+ to access new features like
CLIENT NO-EVICT.
What's the main benefit of the memory usage reduction?
Applications, especially those using
JedisCluster with many nodes, will see a lower memory footprint. This is crucial for microservices
and containerized environments where resources are constrained.
I use SSL with Jedis. Should I upgrade?
Yes. This release includes fixes for SSL handshake
issues, making secure connections more stable and reliable for production use.
How do I replace the deprecated `maxRedirections` parameter?
Check the official Jedis
documentation for the updated method signatures. The new methods typically handle redirections internally
without requiring you to specify a limit.
Were there any fixes for pipeline operations?
Yes, a bug that could cause a
ClassCastException in PipelineBase was fixed. This makes using pipelines, a common
pattern for performance, more robust.