refactor(jedis): migrate to Jedis 7.2 API with RedisClient#20
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase to use the modern Jedis 7.2 API, replacing deprecated classes with the new unified connection pattern. The migration upgrades Jedis from 7.0.0 to 7.2.0 and eliminates deprecation warnings throughout the codebase.
Key changes include:
- Replacing
JedisPool/JedisPooledwithRedisClient.create()for standalone connections - Replacing
JedisSentinelPoolwithRedisSentinelClient.builder()for HA deployments - Updating all test infrastructure, stores, and demo applications to use the new API
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| core/build.gradle.kts | Upgrades Jedis dependency from 7.0.0 to 7.2.0 |
| core/src/main/java/com/redis/vl/redis/RedisConnectionManager.java | Refactored to use RedisClient and RedisSentinelClient instead of JedisPool/JedisSentinelPool |
| core/src/main/java/com/redis/vl/redis/RedisConnectionConfig.java | Removed deprecated toJedisPoolConfig() method |
| core/src/main/java/com/redis/vl/index/SearchIndex.java | Removed deprecated Jedis constructor, updated to use UnifiedJedis exclusively via getUnifiedJedis() |
| core/src/main/java/com/redis/vl/test/vcr/VCRContext.java | Updated to use UnifiedJedis and raw commands via sendCommand for BGSAVE/LASTSAVE |
| core/src/main/java/com/redis/vl/test/vcr/VCRRegistry.java | Updated field type from JedisPooled to UnifiedJedis |
| core/src/main/java/com/redis/vl/test/vcr/VCRCassetteStore.java | Updated field type from JedisPooled to UnifiedJedis |
| core/src/main/java/com/redis/vl/langchain4j/RedisVLDocumentStore.java | Updated javadoc example to use RedisClient.create() |
| core/src/main/java/com/redis/vl/langchain4j/RedisVLChatMemoryStore.java | Updated javadoc example to use RedisClient.create() |
| core/src/test/java/com/redis/vl/test/BaseIntegrationTest.java | Migrated from JedisPool to RedisClient, simplified cleanup |
| core/src/test/java/com/redis/vl/BaseIntegrationTest.java | Migrated from JedisPool to RedisClient for test infrastructure |
| core/src/test/java/com/redis/vl/BaseSVSIntegrationTest.java | Migrated from JedisPool to RedisClient |
| core/src/test/java/com/redis/vl/redis/RedisConnectionManagerTest.java | Updated tests to use getClient() instead of getJedis(), removed connection pooling test |
| core/src/test/java/com/redis/vl/index/SearchIndexTest.java | Updated to create RedisClient directly, removed separate Jedis client usage |
| core/src/test/java/com/redis/vl/index/SearchIndexIntegrationTest.java | Updated to use unifiedJedis for hash operations instead of deprecated jedis field |
| core/src/test/java/com/redis/vl/schema/JsonFieldAliasIntegrationTest.java | Updated to use RedisClient.create() instead of JedisPooled |
| core/src/test/java/com/redis/vl/langchain4j/RedisVLEmbeddingStoreTest.java | Updated to use RedisClient.create() instead of JedisPooled |
| core/src/test/java/com/redis/vl/langchain4j/RedisVLEmbeddingStoreFilterTest.java | Updated to use RedisClient.create() instead of JedisPooled |
| core/src/test/java/com/redis/vl/langchain4j/RedisVLDocumentStoreTest.java | Updated to use RedisClient.create() instead of JedisPooled |
| core/src/test/java/com/redis/vl/langchain4j/RedisVLChatMemoryStoreTest.java | Updated to use RedisClient.create() instead of JedisPooled |
| demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/service/ServiceFactory.java | Updated to use RedisClient.create() for connection initialization |
| demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/MultimodalRAGStandalone.java | Updated to use RedisClient.create(), removed HostAndPort import |
| demos/rag-multimodal/src/test/java/com/redis/vl/BaseIntegrationTest.java | Migrated from JedisPool to RedisClient |
| demos/rag-multimodal/src/test/java/com/redis/vl/demo/rag/service/MultimodalRAGIntegrationTest.java | Updated to use jedis reference consistently from base class |
| docs/design/VCR_TEST_SYSTEM.md | Updated documentation examples to show RedisClient usage |
| docs/design/EMBEDDINGS_CACHE_ENHANCEMENT.md | Updated constructor signature to use RedisClient |
| docs/content/modules/ROOT/pages/langchain4j.adoc | Updated code examples to use RedisClient.create() instead of JedisPooled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
core/src/main/java/com/redis/vl/redis/RedisConnectionManager.java
Outdated
Show resolved
Hide resolved
demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/MultimodalRAGStandalone.java
Outdated
Show resolved
Hide resolved
Replace all deprecated Jedis classes with the new unified Jedis 7.2 API: - Upgrade Jedis dependency from 7.0.0 to 7.2.0 - Replace JedisPool/JedisPooled with RedisClient.create() - Replace JedisSentinelPool with RedisSentinelClient.builder() - Remove JedisPoolConfig dependency from RedisConnectionConfig - Update SearchIndex to use unified getUnifiedJedis() method - Update VCR infrastructure (VCRContext, VCRRegistry, VCRCassetteStore) - Update all test base classes to use RedisClient - Update LangChain4J stores and documentation examples - Update demo applications (rag-multimodal, standalone) The new Jedis 7.2 API provides: - RedisClient for standalone connections - RedisSentinelClient for HA deployments - RedisClusterClient for cluster mode - All extend UnifiedJedis for backwards compatibility This removes deprecation warnings and modernizes the codebase to use the recommended Jedis connection patterns.
7019b66 to
36b7091
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace all deprecated Jedis classes with the new unified Jedis 7.2 API:
The new Jedis 7.2 API provides:
This removes deprecation warnings and modernizes the codebase to use the recommended Jedis connection patterns.