Kuvel
Kuvel copied to clipboard
fix(deps): update dependency redis.clients:jedis to v5.2.0
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
redis.clients:jedis | 5.1.4 -> 5.2.0 |
Release Notes
redis/jedis (redis.clients:jedis)
v5.2.0
: 5.2.0 GA
Enhanced Client-side caching
We are happy to announce that improved server-assisted, client-side caching is now generally available! Special thanks to all our beta testers for their valuable feedback, which helped us refine and improve the initial implementation.
Client-side caching is supported exclusively with the RESP3 protocol with Redis >= 7.4 and is available in UnifiedJedis, JedisPooled, and JedisCluster and other classes.
How to try Client-Side Caching
- Install Jedis 5.2.0
- Use the following code example to get started:
public class CSCExampleTest {
public static void main() {
HostAndPort node = HostAndPort.from("localhost:6379");
JedisClientConfig clientConfig = DefaultJedisClientConfig.builder()
.resp3() // RESP3 protocol is required for client-side caching
//.user("myuser") // Redis server username (optional)
//.password("mypass") // Redis user's password (optional)
.build();
CacheConfig cacheConfig = getCacheConfig();
Cache cache = CacheFactory.getCache(cacheConfig);
try (UnifiedJedis client = new UnifiedJedis(node, clientConfig, cache)) {
client.set("foo", "bar");
client.get("foo");
client.get("foo"); // Cache hit
System.out.println("Cache size: " + cache.getSize()); // 1
System.out.println(cache.getStats().toString());
//Let's change the value of "foo" to invalidate the value stored in the local cache
client.mset("foo", "new_value", "ignore_me:1", "another_value");
Thread.sleep(1000); // wait for the cache invalidation to happen
System.out.println(client.get("foo")); // Cache miss
System.out.println(cache.getStats().toString());
client.get("ignore_me:1"); // Client will ignore this key
System.out.println("Cache size: " + cache.getSize()); // still 1
// check the cache stats
System.out.println(cache.getStats().toString());
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
private static CacheConfig getCacheConfig() {
// This is a simple cacheable implementation that ignores keys starting with "ignore_me"
Cacheable cacheable = new DefaultCacheable() {
final String IGNORE_PREFIX = "ignore_me";
@​Override
public boolean isCacheable(ProtocolCommand command, List<Object> keys) {
// assuming we'll only execute methods with string keys
List<String> stringKeys = keys.stream()
.filter(obj -> obj instanceof String)
.map(obj -> (String) obj)
.collect(Collectors.toList());
for (String key : stringKeys) {
if (key.startsWith(IGNORE_PREFIX)) {
return false;
}
}
return isDefaultCacheableCommand(command);
}
};
// Create a cache with a maximum size of 10000 entries
return CacheConfig.builder()
.maxSize(10000)
.cacheable(cacheable)
.build();
}
}
It is possible to limit or ignore commands or keys for client-side caching. The getCacheConfig
method presented above provides an example of how to achieve that.
π₯ Breaking Changes
- JedisConnectionException contains HostAndPort from DefaultJedisSocketFactory (#β3896)
- Address change in JSON.GET command without path (#β3858)
- Modify and fail-fast GeoSearchParam (#β3827)
- Support transaction from UnifiedJedis without calling multi first (#β3804)
- Reduce the log level of validateObject to WARN (#β3750)
π§ͺ Experimental Features
- Support automatic namespacing (#β3781)
- Added support for ADDSCORES argument in FT.AGGREGATE (#β3908)
- Support IGNORE and other optional arguments for timeseries commands (#β3860)
π New Features
- Support Hash field expiration (#β3826)
- Add equals and hashCode to Timeseries Params classes (#β3959)
- Decoding FT.SEARCH reply can be disabled at field level (#β3926)
- Get enriched Connection information (#β3745)
- Support execute the read-only command on replica nodes (#β3848)
- JedisConnectionException contains HostAndPort from DefaultJedisSocketFactory (#β3896)
- Support [S]PUBLISH in pipelines and transactions (#β3859)
- Support Hash field expiration (#β3826)
- Custom connection pool to MultiClusterPooledConnectionProvider (#β3801)
- PubSub handle array of messages for RESP2 (#β3811)
- Support transaction from UnifiedJedis without calling multi first (#β3804)
- Add last entry id for XREADs and support XREADs reply as map (#β3791)
- Add Experimental, Internal and VisibleForTesting annotations (#β3790)
- Implement equals and hashcode in Params classes (#β3728)
- Add support for redis command: CLIENT TRACKINGINFO (#β3751)
- Support the MAXAGE option for CLIENT KILL (#β3754)
- Polish #β3741 (#β3746)
- Add support for the NOVALUES option of HSCAN (#β3741)
- Support issuing Latency commands (#β3729)
π Bug Fixes
- Accept null replies for BZPOPMAX and BZPOPMIN commands (#β3930)
- Fix empty LUA table reply (#β3924)
- Ensure closing connection in Pipeline (#β3865)
- Address change in JSON.GET command without path (#β3858)
- Consider null values in empty StreamPendingSummary (#β3793)
- Fix UnifiedJedis pexpireAt glitch (#β3782)
- Use expiryOption in PipelineBase.expireAt (#β3777)
- Stop connection fetching before sync/exec (#β3756)
- Check for thread interrupt in subscribe process of PubSub (#β3726)
- Avoid NPE in MultiNodePipelineBase.java (#β3697)
- Fix probable missing (RESP3) protocol processing (#β3692)
- Use circuit breaker fallback exception list (#β3664)
π§° Maintenance
- Deprecate Triggers and Functions feature (#β3968)
- Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.3.1 to 5.4 (#β3962)
- Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.1 to 3.5.0 (#β3950)
- Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.8.0 to 3.10.0 (#β3949)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.5 to 3.2.6 (#β3957)
- Added JavaDoc for basic JedisCluster constructors (#β3304)
- Bump org.locationtech.jts:jts-core from 1.19.0 to 1.20.0 (#β3948)
- Add A-A failover scenario test (#β3935)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.4 to 3.2.5 (#β3936)
- Fix codecov upload (#β3933)
- Rename readonly config param to specify Redis Cluster (#β3932)
- Modify Connection.toIdentityString and test (#β3931)
- Revert "Creating CODEOWNERS for the examples (#β3570)" (#β3897)
- Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 to 3.3.1 (#β3891)
- Bump org.hamcrest:hamcrest from 2.2 to 3.0 (#β3914)
- Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0 (#β3909)
- Bump net.javacrumbs.json-unit:json-unit from 2.38.0 to 2.40.1 (#β3903)
- Bump org.apache.maven.plugins:maven-release-plugin from 3.0.1 to 3.1.1 (#β3890)
- Fixed typo in Javadoc (#β3917)
- Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.1 to 3.4.2 (#β3910)
- Bump com.kohlschutter.junixsocket:junixsocket-core from 2.9.1 to 2.10.0 (#β3901)
- Bump jackson.version from 2.17.1 to 2.17.2 (#β3902)
- Add Scenario tests (#β3847)
- Modify the judgment that reads a response as empty to isEmpty method (#β3888)
- Replace
synchronized
withj.u.c.l.ReentrantLock
for Loom (#β3480) - Extract messages of unsupported exception as constants (#β3887)
- Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.3 to 3.7.0 (#β3851)
- Bump org.sonatype.plugins:nexus-staging-maven-plugin from 1.6.13 to 1.7.0 (#β3850)
- Bump com.google.code.gson:gson from 2.10.1 to 2.11.0 (#β3842)
- Merge doc tests into main branch to keep in-sync with the code (#β3861)
- Deprecate unused Set<Tuple> builders (#β3857)
- Disable Redis Graph tests (#β3856)
- Introduce EndpointConfig and load endpoint settings from the endpoints.json file (#β3836)
- Address Gears test fail - Cleanup Function libraries (#β3840)
- Bump jackson.version from 2.17.0 to 2.17.1 (#β3833)
- Add methods in CommandArguments and RawableFactory (#β3834)
- Modify and fail-fast GeoSearchParam (#β3827)
- Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.0 to 3.4.1 (#β3822)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.3 to 3.2.4 (#β3823)
- Bump org.apache.maven.plugins:maven-jar-plugin from 3.3.0 to 3.4.0 (#β3819)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.2 to 3.2.3 (#β3818)
- Add more tests for the CommandObjects class (#β3809)
- Resolve compile warnings (#β3810)
- Bump com.kohlschutter.junixsocket:junixsocket-core from 2.9.0 to 2.9.1 (#β3806)
- Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12 (#β3805)
- Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.3.1 (#β3807)
- Deprecate unused JSON.ARRAPPEND in CommandObjects (#β3798)
- Extensive unit tests for the CommandObjects class (#β3796)
- Add extensive tests for UnifiedJedis (#β3788)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.1 to 3.2.2 (#β3794)
- Add Experimental, Internal and VisibleForTesting annotations (#β3790)
- Add TS.INFO [DEGUB] and CF.MEXISTS in pipelined commands (#β3787)
- Bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.1 to 3.13.0 (#β3786)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.0 to 3.2.1 (#β3785)
- Pipelined tests for lists and sets, and API typo fix (#β3772)
- Extensive unit tests for PipeliningBase (#β3778)
- Bump jackson.version from 2.16.2 to 2.17.0 (#β3776)
- Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.0 (#β3775)
- Fix typo in SetPipelineCommands method name (#β3773)
- Streamline test execution (#β3760)
- Add pipelined tests for sorted sets (#β3771)
- Geo pipelined tests (#β3767)
- Reenable clustering tests (#β3764)
- GETSET command is deprecated since Redis 6.2.0 (#β3768)
- Add tests for Stream pipelined commands (#β3763)
- Bump jackson.version from 2.16.1 to 2.16.2 (#β3762)
- Bump org.json:json from
2024020
to2024030
(#β3752) - Add Hashes pipeline commands unit tests (#β3288)
- Add unit tests for pipelining - migrate and db commands (#β3759)
- Reduce the log level of validateObject to WARN (#β3750)
- Bump org.json:json from
2023101
to2024020
(#β3706) - Bump com.kohlschutter.junixsocket:junixsocket-core from 2.8.3 to 2.9.0 (#β3724)
- Running doctests also on emb-examples (#β3693)
- Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.3 to 3.2.5 (#β3688)
- Run integration workflow for 5.2.0 branch (#β3681)
- Bump jackson.version from 2.16.0 to 2.16.1 (#β3666)
- Bump org.apache.maven.plugins:maven-compiler-plugin from 3.11.0 to 3.12.1 (#β3665)
- Spellcheck as part of CI (#β3492)
- Adding stale issues workflow (#β3528)
- Creating CODEOWNERS for documentation (#β3570)
- Unifying GitHub tokens (#β3650)
- Replace deprecated set-output command with environment file (#β3622)
- Fixing GPG key usage (#β3670)
- Bump maven-surefire-plugin to 3.2.3 (#β3656)
- Bump org.jacoco:jacoco-maven-plugin from 0.8.5 to 0.8.11 (#β3653)
- Bump jackson databind and jsr310 to 2.16.0 (#β3655)
- Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.2 to 3.6.3 (#β3639)
- Bump com.kohlschutter.junixsocket:junixsocket-core from 2.8.1 to 2.8.3 (#β3647)
- Access Reducer attributes (#β3637)
- Address RediSearch profile change (#β3636)
Contributors
We'd like to thank all the contributors who worked on this release!
@βGandalf1783, @βLcarrot, @βSoilChang, @βandy-stark-redis, @βascdi, @βbabanin, @βcemasma, @βchayim, @βdependabot, @βdependabot[bot], @βgerzse, @βjjz921024, @βjongwooo, @βsazzad16, @βstillerrr, @βthachlp, @βuglide, @βvanta and @βzyfx595701088
v5.1.5
: 5.1.5
Changes
π Bug Fixes
- Accept null replies for BZPOPMAX and BZPOPMIN commands (#β3930)
- Fix empty LUA table reply (#β3924)
Contributors
We'd like to thank all the contributors who worked on this release!
Configuration
π Schedule: Branch creation - "after 9:00 before 23:00" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.