-
Notifications
You must be signed in to change notification settings - Fork 2
refactor(jedis): migrate to Jedis 7.2 API with RedisClient #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.