-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Support Redis 8 vector sets #4169 #4203
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
Add support for
- VRANDMEMBER
- vlinks
- vrem
- vemb
- vcard
- vadd
- vsim
- vdim
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
Adds support for Redis 8 vector set commands across unified, pooled, and cluster clients, including new test coverage and API interfaces.
- Introduces vector set test utilities and base test classes (
VectorTestUtils,VectorSetCommandsTestBase,ExtendedVectorSetCommandsTestBase). - Adds new command interfaces for vector sets (
VectorSetCommands,VectorSetBinaryCommands,VectorSetPipelineCommands,VectorSetPipelineBinaryCommands) and integrates them into existing pipelines and Jedis command surfaces. - Updates pooled and cluster test classes to use a shared
createTestClientpattern and remove manual tear-down logic.
Reviewed Changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/redis/clients/jedis/commands/VectorSetCommands.java | New interface for core vector set commands |
| src/main/java/redis/clients/jedis/commands/VectorSetBinaryCommands.java | New interface for binary vector set commands |
| src/main/java/redis/clients/jedis/commands/VectorSetPipelineCommands.java | New pipeline interface for vector set commands |
| src/main/java/redis/clients/jedis/commands/VectorSetPipelineBinaryCommands.java | New pipeline interface for binary vector set commands |
| src/main/java/redis/clients/jedis/commands/PipelineCommands.java | Added VectorSetPipelineCommands |
| src/main/java/redis/clients/jedis/commands/PipelineBinaryCommands.java | Added VectorSetPipelineBinaryCommands |
| src/main/java/redis/clients/jedis/commands/JedisCommands.java | Added VectorSetCommands |
| src/main/java/redis/clients/jedis/commands/JedisBinaryCommands.java | Added VectorSetBinaryCommands |
| src/test/java/redis/clients/jedis/commands/unified/VectorTestUtils.java | Utility for FP32 <→ float conversions in tests |
| src/test/java/redis/clients/jedis/commands/unified/VectorSetCommandsTestBase.java | Core integration tests for all vector set commands |
| src/test/java/redis/clients/jedis/commands/unified/ExtendedVectorSetCommandsTestBase.java | Extended sample tests based on Redis documentation |
| src/test/java/redis/clients/jedis/commands/unified/pipelined/* | Updated pooled tests to use createTestClient pattern |
| src/test/java/redis/clients/jedis/commands/unified/cluster/* | Updated cluster tests to use createTestClient |
| src/test/java/redis/clients/jedis/commands/unified/UnifiedJedisCommandsTestBase.java | Added abstract createTestClient and lifecycle hooks |
| src/test/java/redis/clients/jedis/commands/unified/StreamsBinaryCommandsTestBase.java | Removed unused setUpTestClient stub before streams |
Comments suppressed due to low confidence (1)
src/test/java/redis/clients/jedis/commands/unified/VectorSetCommandsTestBase.java:199
- The
noQuantParamsvariable is mistakenly initialized with.q8(). It should use.noQuant()to test the NOQUANT quantization scenario.
VAddParams quantParams = new VAddParams().q8();
src/test/java/redis/clients/jedis/commands/unified/VectorSetCommandsTestBase.java
Outdated
Show resolved
Hide resolved
- Add integration test for Jedis client
6e0e51e to
0ac4ad8
Compare
atakavci
left a comment
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.
LGTM!
just a few nits.
- remove duplicated DOUBLE_LIST - reduce code duplication
atakavci
left a comment
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.
LGTM
src/test/java/redis/clients/jedis/commands/unified/StreamsBinaryCommandsTestBase.java
Show resolved
Hide resolved
uglide
left a comment
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.
LGTM
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [redis.clients:jedis](https://github.com/redis/jedis) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.1.0` -> `6.2.0` | | [com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.98.1` -> `6.99.0` | --- ### Release Notes <details> <summary>redis/jedis (redis.clients:jedis)</summary> ### [`v6.2.0`](https://github.com/redis/jedis/releases/tag/v6.2.0): 6.2.0 ### Changes #### 🚀 New Features - \[vector sets] Support for VSIM WITHATTRIBS (CAE-1421) ([#​4260](redis/jedis#4260)) - Support Redis 8 vector sets [#​4169](redis/jedis#4169) ([#​4203](redis/jedis#4203)) #### 🐛 Bug Fixes - Fix JedisBroadcastException in functionLoadReplace for Redis Cluster ([#​4219](redis/jedis#4219)) #### 🧰 Maintenance - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3 ([#​4246](redis/jedis#4246)) - Bump org.junit:junit-bom from 5.13.3 to 5.13.4 ([#​4216](redis/jedis#4216)) - docs: Improve Javadoc for HostAndPortMapper ([#​4112](redis/jedis#4112)) ([#​4227](redis/jedis#4227)) #### Contributors We'd like to thank all the contributors who worked on this release! [@​JuneYub](https://github.com/JuneYub), [@​Kguswo](https://github.com/Kguswo), [@​dependabot](https://github.com/dependabot), [@​dependabot](https://github.com/dependabot)\[bot] and [@​ggivo](https://github.com/ggivo) </details> <details> <summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner)</summary> ### [`v6.99.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6990-2025-08-26) ##### Features - Support read lock mode for R/W transactions ([#​4010](googleapis/java-spanner#4010)) ([7d752d6](googleapis/java-spanner@7d752d6)) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.62.0 ([52c68db](googleapis/java-spanner@52c68db)) - GetCommitResponse() should return error if tx has not committed ([#​4021](googleapis/java-spanner#4021)) ([a2c179f](googleapis/java-spanner@a2c179f)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.52.0 ([#​4024](googleapis/java-spanner#4024)) ([7e3294f](googleapis/java-spanner@7e3294f)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 9d031eaaab2d726402884bd41681c856931f12f0
* Jedis 5.2.0 is released; bump snapshot version to 5.3.0 (#3975)
* DOC-4317 fixed flaky tests (#3984)
* Bump jackson.version from 2.17.2 to 2.18.0 (#3977)
Bumps `jackson.version` from 2.17.2 to 2.18.0.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.17.2 to 2.18.0
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.17.2 to 2.18.0
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump com.kohlschutter.junixsocket:junixsocket-core from 2.10.0 to 2.10.1 (#3978)
Bumps [com.kohlschutter.junixsocket:junixsocket-core](https://github.com/kohlschutter/junixsocket) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/kohlschutter/junixsocket/releases)
- [Commits](https://github.com/kohlschutter/junixsocket/compare/junixsocket-2.10.0...junixsocket-2.10.1)
---
updated-dependencies:
- dependency-name: com.kohlschutter.junixsocket:junixsocket-core
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.6 to 3.2.7 (#3976)
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.6 to 3.2.7.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.6...maven-gpg-plugin-3.2.7)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.0 to 3.5.1 (#3989)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.0...surefire-3.5.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix JavaDoc warnings (#3990)
* Add javadoc to clear up implicit behavior (#3991)
* add javadoc to clear up implicit behavior
* reword this paragraph
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.10.1 (#3994)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.0...maven-javadoc-plugin-3.10.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix flaky tests with 'await' (#3972)
* fix flaky test - dumy set-get to gain time
* adding same commands for 'simple'
* introdue tryAssert in CSC tests
* remove leftovers
* introduce awaitility for polling
* nit
* fix pipelining test
untilasserted
* Codecove has released beta version of Test Analytics feature (#3996)
* Codecov Test Analytics integration
Codecove has released beta version of Test Analytics feature
more details can be found [here|https://docs.codecov.com/docs/test-result-ingestion-beta]
Since we are already integrated with Codecov (storing code coverage data) the idea is to try out if Test Analytics feature will provide visibility over flaky tests and stability of the tests/build. Hopefully, we will have a base to compare and identify regressions.
Changes (only in build actions)
- Add step to publish junit report files to codecove
- Add basic codecov.yml config (filter out files that are not junit reports)
Conditionally upload junit reports only on nightly build & push to branch
* Remove verbose flag
* Push test results also if job manully triggered
* Update links in README (#3974)
* Mkdocs unify docs (#3999)
* basic mkdocs setup and workflow
* rename workflow
* copy lettuce
* add index
* integrate current wiki and docs content
* integrate current wiki and docs content
* add a few more links
* fix branch in actions
* remove redundant getting started and maven docs
* Revert jedis-maven doc deletion
* Exclude Dockerfile and css from spellcheck
* Fix spelling
* Remove assets from spellcheck-settings.yml
* Add build for dev branch
* Another attempt to fix spellcheck
* Add some words to wordlist
* Add more words to wordlist
* Update .github/workflows/docs.yml
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
---------
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Bump jackson.version from 2.18.0 to 2.18.1 (#4006)
Bumps `jackson.version` from 2.18.0 to 2.18.1.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.0 to 2.18.1
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.0 to 2.18.1
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4 to 5.4.1 (#4009)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4 to 5.4.1.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.4.1/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4...rel/v5.4.1)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* DOC-4345 added JSON search examples for home page (#4010)
* DOC-4345 added JSON search examples for home page
* DOC-4345 made blank lines more consistent
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4345 applied feedback
* Update src/test/java/io/redis/examples/HomeJsonExample.java
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* COMMAND INFO reply contains subcommand detail (#4022)
* COMMAND INFO reply contains subcommand detail
* Add 'name' in CommandInfo
Fixes #4020
___
* COMMAND INFO reply contains subcommand detail
* Add 'name' in CommandInfo
* Safeguard test from future ACL subcommands
* Ensure reply size
* Move null checking into COMMAND_INFO_BUILDER from inside loop and reduce parsing 'name' multiple times
* Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.1 to 3.5.2 (#4008)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.1...surefire-3.5.2)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.1 (#4007)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.1 to 3.11.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.1...maven-javadoc-plugin-3.11.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add examples and tutorials page (#4024)
* add exmples and tutorials page
* update wordlist
* Implement command (no arg) (#4026)
* Implement command (no arg)
https://redis.io/docs/latest/commands/command/
Adding it for completeness and as alternative to COMMAND INFO for Redis server prior 7.0.0.
COMMAND (no args) is available with Redis 2.x
COMMAND INFO is available since REDIS version 7.0.0
Relates to: #2922
Support COMMAND commands (#2922)
commit : 35904380a3388721bf27980171e6446b5181c3e8
Closes #793
* Update ControlCommandsTest.java
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Make reply of ACL LOG compatible with older Redis versions (#4030)
* Make reply of COMMAND INFO compatible with older Redis versions (#4031)
* Bump jackson.version from 2.18.1 to 2.18.2 (#4034)
Bumps `jackson.version` from 2.18.1 to 2.18.2.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.1 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.1 to 2.18.2
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* DOC-4560 pipe/transaction examples for docs (#4038)
* DOC-4560 pipe/transaction examples for docs
* Update src/test/java/io/redis/examples/PipeTransExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2 (#4039)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.1 to 3.11.2.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.1...maven-javadoc-plugin-3.11.2)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Token based authentication integration with core extension (#4011)
* tba draft
* - stop authxmanager on pool close
- swith to long dates
* drop use of authxmanager and authenticatedconnection from core
* -update submodule ref
-change exception message
* - remove submodule
- update dependency
* back to current version
* - move autxhmanager creation to user space
- introduce authenticationeventlisteners
- clenaup in connectionpool
- add entraidtestcontext
- add redisintegrationtests
- fix failing tokenbasedauthentication unit&integ tests
* - prevent use of pubsub with TBA+RESP2 combination
- fix flaky test
* - support tba with clusters
- add cluster+tba tests
* - remove onerror from authxmanager
- fix flaky tests
* - fix flaky test
* fix renewalDuringOperationsTest
* -reviews from @sazzad16
* - fix config for managedIdentity
- set audiences with scopes
- managed identity tests
* review from @ggivo
- use getuser instead oid from Token
* handle and propogate from unsuccessful AUTH response
* adding reauth support for both pubsub and shardedpubsub
* fix ping issue with pubsub
* - review from @sazzad16 : make JedisSafeAuthenticator protected
- fix failing unit tests
* update authx version
* - remove workaround for standalone endpoint
* Minor fix with Token-Based-Authentication integration tests (#4044)
- set endpoint for entraid cluster intg tests
- enable networkpartition tests
* Add SslOptions (#3980)
Similar to SslOptions in Lettuce library.
---
* Add SslOptions from Lettuce library
* Add InsecureTrustManagerFactory from Netty library
* Separate SSL socket creation in DefaultJedisSocketFactory
* Add SslOptions in JedisClientConfig
* Add SslHostnameVerifyMode
inspired by SslVerifyMode in Lettuce
* Allow system default key and trust managers and insecure trust manager
* fix jdoc
* Address review comments
* Revert back to verification mode names in Lettuce,
to avoid confusion at this moment.
* Rename insecureTrust to noTruststoreVerification;
does this reduce confusion?
* SslVerifyMode is renamed back
and INSECURE option (renamed from NONE) is added back in SslVerifyMode.
* Remove InsecureTrustManagerFactory
* Disable ALL existing SSL tests
* JedisTest with SslOptions
* SSLACLJedisTest with SslOptions
* SSLOptionsJedisSentinelPoolTest with SslOptions
* SSLJedisClusterTest with SslOptions
* TODO comment to enable existing SSL tests
* TODO command to enable existing SSL tests in csc package
* Enable existing SSL tests without impacting new ones
* Missing enable existing SSL tests without impacting new ones
* Keep only Builder pattern constructor for DefaultJedisClientConfig
* Limit HostnameVerifier only for legacy ssl config
and document as JavaDoc in JedisClientConfig
* Remove unused codes from SSLOptionsJedisTest
* Increase code reuse for LocalhostVerifier
* Individual JavaDoc for each SslVerifyMode
* Custom SocketFactory won't be supported with SslOptions
* Deprecate DefaultJedisClientConfig.copyConfig()
* Add option to set SSLContext protocol
* Remove options to set KeyManager and TrustManager algorithms
* Add File checkers
* minor user/password change
* minor update javadoc
* Allow manual HostnameVerifier with SslOptions
* Make test connectWithCustomHostNameVerifier() pass
* Better SslOptions with custom HostnameVerifier
in connectWithCustomHostNameVerifier() test
* Shorten sslContextProtocol to sslProtocol
* Use null as default password,
unlike Lettuce where it uses empty char array.
* Make an accidental private truststore builder option public
* Remove Lettuce comments
* Add JedisPooled tests
* Use char array for password
* Remove file license
* Address code review
* Merge fix
* Deprecate helper methods in DefaultJedisClientConfig
* DOC-4450 added hgetall and hvals command examples (#4050)
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Remove List tests asserting timeouts (#4051)
As a client library, it should be enough to send the command arguments and get & parse the reply properly.
* Introduces test matrix based on Redis versions [8.0-M02, 7.4.1, 7.2.6, 6.2.16] (#4015)
* Introduces test matrix based on Redis versions [8.0-M1, 7.4.1, 7.2.6, 6.2.16]
Use docker composer to bring up the test env using `redislabs/client-libs-test` image.
When run against older Redis version some tests are using commands available only in newer Redis server versions. To resolve this we are introducing two new annotations/rules
- Introduce `SinceRedisVersion` annotation/Rule - for conditionally running tests based on Redis server version contacted
- Introduce `EnableOnCommad` annotation/Rule - for conditionally running tests based on command availability on the server
And mark respective tests with the least Redis Version required by the test
- SinceRedisVersion ("7.4.0") - Mark tests using commands/modifiers introduced with Redis 7.4.0
- SinceRedisVersion ("7.2.0") - Mark tests using commands/modifiers introduced with Redis 7.2.0
- SinceRedisVersion ("7.0.0") - Mark tests using commands/modifiers introduced with Redis 7.0.0
The same approach used to mark CSC tests
- Disabled client-side caching tests for versions below 7.4
- Test env migrated to use native Redis server TLS instead of using stunnel
Not all tests were migrated
- Disable Modules test in containerized test env ModuleTest uses custom test module to test load/unload/sendCommand.
Requires pre-build test module on the same os like test container to avoid errors
- Disable UDS tests in containerized test env
No easy way to make unix sockets work on MAC with docker
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Fix sporadic test failing with OOM (#4053)
* Attempt to fix sporadic test failing with OOM
Troubleshooting flaky test failing with OOM
* Authx.close() in try/finally
* Configure retention for uploaded heap dumps to 5days
remove PrintFlagsFinal to avoid warning in buld logs
* format TokenBasedAuthenticationUnitTests
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4495 sadd and smembers examples (#4052)
* DOC-4495 sadd and smembers examples
* DOC-4495 tidied formatting
* Apply suggestions from code review
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4475 examples for llen, lpop, lpush, lrange, rpop, and rpush (#4054)
* Format DOC examples
* Use v4 of upload artifact (#4061)
* Upgrade GitHub Python artifact for Publish Docs (#4062)
* Use v3 of GitHub upload-pages-artifact for Publish Docs (#4063)
* Use v3 of GitHub deploy-pages for Publish Docs (#4064)
* Revert failing GitHub artifacts for Publish Docs (#4065)
* Revert "Use v3 of GitHub upload-pages-artifact for Publish Docs (#4063)"
This reverts commit aee2ddf87bdc69753b20d34ffa8cc52b1ffe4791.
* Revert "Use v3 of GitHub deploy-pages for Publish Docs (#4064)"
This reverts commit 2e06aea00873209a95b7e2441fa5e7076c981c93.
* DOC-4440 added auth command examples using Jedis class (#4058)
* DOC-4440 added placeholder for auth command examples
* DOC-4440 added auth command examples using Jedis class
* DOC-4732 added geo index examples (#4059)
* DOC-4732 added geo index examples
* DOC-DOC-4732 fixed problem reported in feedback
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update actions/checkout, actions/setup-java and codecov/codecov-action (#4066)
* DOC-4445 server management command examples (#4056)
* DOC-4445 server management command examples
* DOC-4445 implemented info command example with Jedis class
* Apply suggestions from code review
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4445 implemented feedback
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Fix TBA cluster integration tests (#4068)
* - fix cluster int tests
- add entraid integ tests
- fix ConcurrentModification
* fix ConcurrentModification with RedisEntraIDClusterIntegrationTests.testClusterWithReAuth
* Test with 8.0-M04-pre (#4069)
* Test with 8.0-M03-pre
* Test with 8.0-M03-pre
* Test with 8.0-M03
* Test with 8.0-M04-pre
* SearchDefaultDialectTest.testDialectsWithFTExplain
Output of ft.explain has changed in Redis 8.0.
Existing Jedis client ftExplain() API returns the raw output and does not perform any parsing/mapping, hence updating the test to verify only for received output when used with correct dialect & gets syntax error otherwise.
* Update testAggregationBuilderAddScores test to match change in SEARCH module replacing default SCORER from TF-IDF to BM25.
* Apply suggestions from code review
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Address review comments
* Update SearchDefaultDialectTest.java
* Output of ft.explain has changed in Redis 8.0.
Existing Jedis client ftExplain() API returns the raw output and does not perform any parsing/mapping, hence updating the test to verify only for received output when used with correct dialect & gets syntax error otherwise.
* minor changes: format, private, unused variable, etc.
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Test modules ACL support (#4042)
* Test HASH module ACL support
* Add version rule
* Test modules acl categories
* Test according to design doc with Redis 8.0-M03
* Based on RedisModuleCommandsTestBase
* Test modules CONFIG support (#4043)
* Test SEARCH module CONFIG support
* Test according to design doc with Redis 8.0-M03
* Set the version rule
* Deprecate FT.CONFIG command and keyworkds
* Shorten file name
* fix typo
* Redis 8.0-M03 image reports the version as 7.9.226
* Redis 8.0-M04-pre restored defaults
* Based on RedisModuleCommandsTestBase
* close resource
* Remove SearchConfigTest (#4072)
All the 'Test's are already 'Ignore'd, due to unavailability/instability of FT.CONFIG command.
* Support warning messages in search/aggregation query results (#3958)
* Support warning messages in search/aggregation query results
* private constructor
* Enable respective Test
* add test rule
* Remove Triggers and Functions feature (#3969)
* Change FT.PROFILE to return generic object (#4067)
* Change FT.PROFILE to return generic object
* Handle FT.PROFILE Results for both Redis 7 and 8
* Remove Graph module support (#4073)
* Bump to 6.0.0 snapshot
* Use v2 of GitHub upload-pages-artifact for Publish Docs
* Use v3 of GitHub upload-pages-artifact for Publish Docs
* Use v4 of GitHub deploy-pages for Publish Docs
* Use v4 of few GitHub actions workflow artifacts (#4075)
These include:
- checkout
- setup-java
- cache
* Running doctests on master branch
Docs are now written in master branch instead of emb-examples branch.
* Fix the Java example code for Lists using RPUSH (#4074)
* fixing the Java code to match the redis cli example and the context
* fixing the tests
---------
Co-authored-by: Mohamed Sanaulla <msanaulla@gso.org.sa>
* Bump org.apache.commons:commons-pool2 from 2.12.0 to 2.12.1 (#4080)
Bumps org.apache.commons:commons-pool2 from 2.12.0 to 2.12.1.
---
updated-dependencies:
- dependency-name: org.apache.commons:commons-pool2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4.1 to 5.4.2 (#4081)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4.1 to 5.4.2.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.4.2/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4.1...rel/v5.4.2)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump com.google.code.gson:gson from 2.11.0 to 2.12.1 (#4082)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.11.0 to 2.12.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.11.0...gson-parent-2.12.1)
---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.json:json from 20240303 to 20250107 (#4049)
Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20240303 to 20250107.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)
---
updated-dependencies:
- dependency-name: org.json:json
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update redisjson.md (#4083)
* Update redisjson.md
* Update docs/redisjson.md
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix pubsub when cache enabled (#4086)
* fix pubsub when cache enabled
* polish
* Make default client side search dialect to 2 (#4060)
* Make default client side search dialect to 2
* Fix tests
* Extend EXECABORT with "previous errors" #4084 (#4090)
Propagate errors in transaction on command queuing (e.g before actual EXEC).
Errors are added as suppressed exceptions when EXEC is processed.
https://redis.io/docs/latest/develop/interact/transactions/
-A command may fail to be queued, so there may be an error before EXEC is called. For instance the command may be syntactically wrong (wrong number of arguments, wrong command name, ...), or there may be some critical condition like an out of memory condition (if the server is configured to have a memory limit using the maxmemory directive).
closes #4084
* [code cleanup] Jedis client to implement CommandCommands interface (#4077)
[code cleanup] Jedis client to implment CommandCommands interface
When support for COMMAND was added we have missed to add the interface to Jedis client itself
* Enforce code style format (#4087)
* start enforcing format style
* adding format_check
* dummy change
* fix file param
* Create format_check.yml
* workflow_dispatch
* Update format_check.yml
* setup java 11
* add fetch origin
* process list of files
* changes into a file
* Revert "dummy change"
This reverts commit ce6314a5bb95291251163f7252f8f3038e23a0e5.
* Check changed files against different branches
* Support INFO command in UnifiedJedis (simplified) (#4079)
* Support INFO command in UnifiedJedis
* test in cluster
* Support INFO command in UnifiedJedis (simplified)
* fix test
* Update after discussion
* codestyle
* Bump org.awaitility:awaitility from 4.2.2 to 4.3.0 (#4099)
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.2 to 4.3.0.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.2...awaitility-4.3.0)
---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-compiler-plugin from 3.13.0 to 3.14.0 (#4097)
Bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.13.0 to 3.14.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Basic documention for TBA support with some examples (#4102)
* tba doc
* fix sub headers
* fix spellcheck
* updates with suggestions from @uglide
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* review from @ggivo
---------
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* Propagate cause for "Cluster retry deadline exceeded" exception (#4103)
* Bump net.revelc.code.formatter:formatter-maven-plugin from 2.11.0 to 2.16.0 (#4098)
* Bump net.revelc.code.formatter:formatter-maven-plugin
Bumps net.revelc.code.formatter:formatter-maven-plugin from 2.11.0 to 2.25.0.
---
updated-dependencies:
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update pom.xml
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Update stale issue workflow (#4101)
* Update stale issue workflow
- Mark issue as stale only if marked with waiting-for-feedback
- Do not mark issue/PR as stale if mareked with feedback-provided
- Do not mark issue as stale if assigned to milestone
* Update days-before-stale: 30, days-before-close: 30
* Fix JedisURIHelper.getPassword throwing ArrayIndexOutOfBoundsException for username-only URIs (#4109)
Fix for bug #4003. Better message instead of ArrayIndexOutOfBoundsException
Authentication details can be provided in the URI in the form of a username and password.
Examples :
- Username and Password: redis://username:password@host:port
- Password-only: redis://:password@host:port
- No Authentication: redis://host:port
- Empty password: redis://username:@host:port
Using JedisURIHelper with a URI having only a username is considered invalid and should throw `IllegalArgumentException`.
Closes #4003.
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Update redis server test versions (#4114)
Bump test infra to use 8.0-M05-pre
* Test support for DefaultAzureCredential (#4113)
* test support for DefaultAzureCredential
* bump entraid version
* Support for new HFE API, hgetdel hgetex hsetex commands (#4095)
* support for hgetdel hgetex hsetex
* add commands to wordlist
* changes for review from @ggivo
- make base class abstract package private
- deprecate keepttl
* adding java doc for elements in new HFE API
* unifiedjedis java doc for new hfe api
* fix test cases for new HFE API
* move javadoc to interface
* Fix failing network partition test (#4118)
* fix network partition test for possible long duration of fault injection
assert with multiple expected msg
* wait for working connection
* Add tests for getSet() with Parameters (#4127)
Add tests for getSet() with Parameters #4100
* Add tests for vector search INT8/UINT8 types (#4091)
* Bump jackson.version from 2.18.2 to 2.18.3 (#4106)
Bumps `jackson.version` from 2.18.2 to 2.18.3.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.2 to 2.18.3
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.2 to 2.18.3
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Link Jedis 5 migration guide in mkdocs (#4076)
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Document pgp keys (#4125)
* [#3125] Document pgp keys
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix spellcheck
* Fix spellcheck
* Move to docs
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update verifying content doc (#4133)
Replace MIT keyserver links with keyserver.ubuntu.com because of bad performance of MIT key server
* Fix failing ModuleTest & test against 8.0-RC1-pre (#4131)
* Test against 8.0-RC1-pre
* ftSearch() Error message updated to "No such index"
In Redis 8.0.0 error message is updated from "no such index" to "No such index"
* Redis 8.0 comes with vectorset module by default
* Update "Pipelines and transactions" doc example to include pipeline.close() (#4134)
* Update pipeline/transaction examples in documentation to ensure proper transaction/pipeline resource closure
closes #4132
* Update src/test/java/io/redis/examples/PipeTransExample.java
Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
---------
Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
* Fix flaky test JedisPoolTest.testCloseConnectionOnMakeObject (#4138)
* Fix flaky test
* Using await as recommend
* Update ACLJedisPoolTest
* Missing perform request for connection
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Migrate test to JUnit5 (#4139)
* Use junit5 for new test
Add juint5 dependencies to enable writing new tests using juint5
Added junit.vintage module to make sure existing junit4 tests are running till we migrate them.
Migrated BuilderTest.java as example
* Add Junit5 Conditions
- RedisVersionCondition
- EnabledOnCommandCondition
* Refactor junit conditions to use AnnotationUtils
- RedisVersionCondition
- EnabledOnCommandCondition
* Migrate commands.commandobjects tests
* Rebase
* Migrate collections tests
* junit 5.13.0-M1 introduces support for parameterised Class tests
* Migrate redis.clients.jedis to JUnit5
* clean up warnings
* Migrate commands/unified tests
* Delete EnabledOnCommandRule.java
* migrate ExceptionsTest
* migrate csc tests
* migrate misc tests
* migrate authentication tests
* migrate examples tests
* migrate mocked tests
* Migrate module tests
* Migrate parameters tests
* Migrate prefix tests
* Migrate providers tests
* Migrate scenariou & remaining tests
* Migrate examples tests
* Remove junit4 & junit-vintage
* Clean up
* Use mockito-junit-jupiter:4.11.0 for java 1.8 compatibility
* Rebase
* Fix ACLJedisPoolTest, ACLJedisSentinelPoolTest tests
* Fix ACLJedisSentinelPoolTest tests
* Fix for connectionAuthWithExpiredTokenTest (#4142)
fix for connectionAuthWithExpiredTokenTest
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4.2 to 5.4.4 (#4153)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4.2 to 5.4.4.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.4.4/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4.2...rel/v5.4.4)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-version: 5.4.4
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Speed up cluster tests (#4150)
* Bump org.jacoco:jacoco-maven-plugin from 0.8.12 to 0.8.13 (#4137)
Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.12 to 0.8.13.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.12...v0.8.13)
---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
dependency-version: 0.8.13
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.2 to 3.5.3 (#4136)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-version: 3.5.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* DOC-5110 added hash search examples (#4151)
* DOC-5110 added hash search examples
* Java 8 compatibility
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump test infra to 8.0-RC2 (#4155)
* Run pipeline in current thread if all the keys on same node (#4149)
* perf:last node run in current thread directly
* fix: connection leak, we should return it to connection pool
* noop sync when pipelinedResponses.isEmpty()
* revert rename
* clean
* remove last node run in current thread when multi node
* add test for pipeline all keys at same node
* fix: make all keys on same node
* formatting
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump version to 6.1.0-SNAPSHOT after 6.0.0 release (#4157)
* Bump integration branch to next release (6.1.x)
* Update README.md
* Bump com.google.code.gson:gson from 2.12.1 to 2.13.1 (#4161)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.12.1 to 2.13.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.12.1...gson-parent-2.13.1)
---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
dependency-version: 2.13.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.junit:junit-bom from 5.13.0-M1 to 5.13.0-RC1 (#4168)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.13.0-M1 to 5.13.0-RC1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0-M1...r5.13.0-RC1)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.0-RC1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump jackson.version from 2.18.3 to 2.19.0 (#4160)
Bumps `jackson.version` from 2.18.3 to 2.19.0.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.3 to 2.19.0
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-version: 2.19.0
dependency-type: direct:development
update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-version: 2.19.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add binary stream support for XREAD and XREADGROUP (#3566) (#4152)
* Add binary stream support for XREAD and XREADGROUP (#3566)
- Created StreamEntryBinary class to support binary data with Map<byte[], byte[]>
- Added xreadBinary, xreadBinaryAsMap, xreadGroupBinary, and xreadGroupBinaryAsMap methods to StreamBinaryCommands
- Implemented binary stream builders in BuilderFactory
- Added implementation in Jedis and UnifiedJedis classes
- Created BinaryStreamEntryTest to verify binary stream functionality
* Add parameterized binary stream tests for RESP2/RESP3 in Jedis, Cluster, and Pooled clients TEST (#3566)
- Introduce `BinaryStreamEntryTest` and `BinaryStreamsCommandsTestBase` following the unified test pattern
- Add `ClusterBinaryStreamsCommandsTest` and `PooledBinaryStreamsCommandsTest` to cover JedisCluster and JedisPooled
- Parameterize tests to run under both RESP2 and RESP3 protocols
- Format BuilderFactory to conform to project formatter rules
* Switch to StreamEntryID in binary stream tests and add illegal UTF-8 sequence test (#3566)
- Refactor StreamsBinaryCommandsTest: replace Map.Entry<byte[], byte[]> with Map.Entry<byte[], StreamEntryID> for xreadBinary, xreadBinaryAsMap, xreadGroupBinary and related methods
- Update tests to assert on StreamEntryBinary IDs and byte-array payloads accordingly
- Add a new test case covering an illegal UTF-8 sequence (0xc3 0x28) to validate correct binary handling (issue #3566)
* Add Map<byte[], StreamEntryID> support and binary stream tests (#3566)
- Introduce a Map<byte[], StreamEntryID> parameter for binary stream commands
- Duplicate all existing test cases for xread, xreadAsMap, xreadGroup and xreadGroupAsMap from StreamsCommandsTest.java and replace them with xreadBinary, xreadBinaryAsMap, xreadGroupBinary and xreadGroupBinaryAsMap in StreamsBinaryCommandsTest
* Modify Map<byte[], StreamEntryID> support and binary stream tests (#3566)
- Duplicate all existing test cases for xread, xreadAsMap, xreadGroup and xreadGroupAsMap from StreamsCommandsTest.java and replace them with xreadBinary, xreadBinaryAsMap, xreadGroupBinary and xreadGroupBinaryAsMap in StreamsBinaryCommandsTest
* Add JedisByteMap implementation (#3566)
- Implemented a new JedisByteMap<T> class similar to the existing JedisByteHashMap to properly handle byte array keys in Map<byte[], T> operations
- This implementation ensures that `get(byte[])` operations work correctly by using proper byte array equality comparison instead of reference comparison
- Fixes issues when using byte arrays as keys in stream-related operations
* Add JedisByteMapTest (#3566)
- Added tests for JedisByteMap similar to existing JedisByteHashMap tests
* Changed Map<byte[], byte[]> in STREAM_ENTRY_BINARY_LIST to JedisByteHashMap (#3566)
- Changed Map<byte[], byte[]> in STREAM_ENTRY_BINARY_LIST to JedisByteHashMap.
* Remove varargs alternatives
There is already discrepancy in API between
`xread` binary variant & `xread` string one.
Binary one accepts varargs for requested streams, while the string variant expects them to be provided as `Map`.
Going forward xread binary methods should use Map. This commit also marks existing `List<Object> xread` one as deprecated in favor of newly introduced methods
for type safety and better stream entry parsing.
* Add xreadBinary and xreadGroupBinary methods to PipelineBase
* Deprecate List<Object> xreadXXX in favor of newly introduced typed methods
* Clean up
* Java docs
* STREAM_ENTRY_BINARY not used
* Fix BinaryStreamEntryTest test
* Add BinaryStreamsPipeline tests
Added tests to cover Pipeline command executions.
UnifiedJedis BinaryStreamsCommand test clean up and attempt to simplify focused on testing xreadBinary and xreadGroupBinary methods .
* Test cleanup & formating
* Merged & refactored a bit Jedis BinaryStreamEntryTest.java & StreamsBinaryCommandsTest to match UnifiedJedis StreamsBinaryCommandsTestBase.
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Update README.md (#4143)
* slight rewording in README.md
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Add retryable command execution example (#3780)
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix flaky tests in DocumentTest (#3617)
* Fix flaky tests in DocumentTest
* toString() tested only in dedicated test
* formating
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4.4 to 5.5 (#4170)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4.4 to 5.5.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/master/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4.4...rel/v5.5)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-version: '5.5'
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.json:json from 20250107 to 20250517 (#4171)
Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20250107 to 20250517.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)
---
updated-dependencies:
- dependency-name: org.json:json
dependency-version: '20250517'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.junit:junit-bom from 5.13.0-RC1 to 5.13.1 (#4174)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.13.0-RC1 to 5.13.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0-RC1...r5.13.1)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update test infra to use latest Redis (#4179)
* Update test infra to use latest Redis
* Bump jackson.version from 2.19.0 to 2.19.1 (#4180)
Bumps `jackson.version` from 2.19.0 to 2.19.1.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.19.0 to 2.19.1
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-version: 2.19.1
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-version: 2.19.1
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add a test to verify failover on DNS unresolvable host error (#4182)
* Add a test to verify failover on DNS unresolvable host error
* formating
* address review comments
* Fix:JedisCluster throws NullPointerException when maxAttempts is set to 0 (#4186)
* Fix: JedisCluster throws NullPointerException when maxAttempts is set to 0
This change adds input validation to the RetryableCommandExecutor constructor to prevent usage with invalid configuration values, specifically when maxAttempts is set to 0.
Previously, setting maxAttempts to 0 in JedisCluster would result in a NullPointerException during command execution, due to lastException being uninitialized when no attempt is made. With this fix, an IllegalArgumentException is thrown early if maxAttempts < 1, providing clearer feedback to the user and preventing runtime errors.
Added unit tests to verify the validation behavior.
Fixes #4185
Co-authored-by: shivincible <shivangi.gupta.jiit@gmail.com>
* DOC-5227 added probabilistic data type examples (#4184)
* DOC-5227 added probabilistic data type examples
* DOC-5227 replaced Map.of() calls
* DOC-5227 fixed example output comment
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Bump org.junit:junit-bom from 5.13.1 to 5.13.2 (#4192)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.1 to 5.13.2.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.7 to 3.2.8 (#4197)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
dependency-version: 3.2.8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Migrate publishing to Maven Central Portal (#4199)
* Migrate publishing to Maven Central Portal
* Clean up scm section in pon.xml
* Add Support for New BITOP Operations in Redis 8.2 (#4188) (#4190)
* Add Support for New BITOP Operations in Redis 8.2 (#4188)
This PR adds support for the new BITOP operations introduced in Redis Community Edition 8.2: DIFF, DIFF1, ANDOR, and ONE.
Changes
- Added new enum values to BitOP.java for the new operations: DIFF, DIFF1, ANDOR, and ONE
- Updated tests in BitCommandsTest.java and BitCommandsTestBase.java to verify the new operations
New Operations
- DIFF(X, Y1, Y2, ...): Members of X that are not members of any of Y1, Y2, ...
Equivalent to: X ∧ ¬(Y1 ∨ Y2 ∨ ...)
- DIFF1(X, Y1, Y2, ...): Members of one or more of Y1, Y2, ... that are not members of X
Equivalent to: ¬X ∧ (Y1 ∨ Y2 ∨ ...)
- ANDOR(X, Y1, Y2, ...): Members of X that are also members of one or more of Y1, Y2, ...
Equivalent to: X ∧ (Y1 ∨ Y2 ∨ ...)
- ONE(X1, X2, ...): Members of exactly one of X1, X2, ...
For two bitmaps, this is equivalent to XOR(X1, X2)
For more than two bitmaps, this represents elements that appear in exactly one input
Closes #4188
* Apply suggestions from code review
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* format new bitop tests
* Bump of test infra to use Redis 8.2 will be handled with separate PR
* format
---------
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* Bump org.junit:junit-bom from 5.13.2 to 5.13.3 (#4198)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Fix flaky test ClientCommandsTest.killSkipmeYesNo (#4206)
* Fix flaky test ClientCommandsTest.killSkipmeYesNo
* Format the file
* revert formatting only changes
* improve test failure reporting
* fix test condition
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix memory leak in JedisClusterInfoCache - replica nodes not cleared (#4205)
* Update reset on JedisClusterInfoCache
* Fix the test
Try to run mvn formatter:format
Try to format the file
Revert "Try to format the file"
This reverts commit 535c05186e34a4f096aa4945ceae9ec0a0f6fca3.
Format ControlCommandsTest
* Add unit test for JedisClusterInfoCache
Add test to ensure that the cluster info cache correctly manages replica nodes after topology changes and resets.
- Added scenarios to test rediscovery of cluster nodes and slots, especially handling the removal and reappearance of replica nodes.
- Enhanced unit tests to verify that calling reset() properly clears replica slot information.
* revert formating only changes
* format updated code
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump jackson.version from 2.19.1 to 2.19.2 (#4208)
Bumps `jackson.version` from 2.19.1 to 2.19.2.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.1 to 2.19.2
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.19.1 to 2.19.2
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-version: 2.19.2
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-version: 2.19.2
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add 8.2 to test matrix (#4195)
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* Check formatting only for new files (#4212)
* Add support for new stream commands (#4211)
* Add support for new stream commands
- Add support for xackdel and xdelex
- Extend xadd and xtrim
- Add relevant tests
* Clean up tests
* Rename StreamTrimMode and StreamTrimResult
StreamTrimMode -> StreamDeletionPolicy
StreamTrimResult -> StreamEntryDeletionResult
* Fix formatting in new files
* fix doc comments formatting
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix test coverage generation (#4213)
* Fix test coverage generation
* Keep the JVM_OPTS
* Align codecov config with lettuce (#4214)
- Enable coverage reporting for PRs
- Add defaults
* DOC-5471 time series doc examples (#4210)
* DOC-5471 time series doc examples
* DOC-5471 added REMOVE section around initial key deletions
* DOC-5471 added TSElement import to fix CI errors
* DOC-5471 replaced Map.entry with AbstractMap.SimpleEntry<> for compatibility
* DOC-5471 fixed a few remaining instances of Map.entry
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Bump 8.2 test infra to 8.2-rc1 (#4215)
* Clarify why new stream entries aren't deleted with XDELEX (#4218)
* Improve naming for status 2 in StreamEntryDeletionResult
* Clarify why new stream entries aren't deleted with XDELEX
* Fix formatting of StreamEntryDeletionResultTest
* verify against redis 8.2-rc2-pre (#4221)
* verify against redis 8.2-rc2-pre
* Update ControlCommandsTest.memoryUsageBinary to match reduced memory usage
Seems latest 8.2 redis version consumes less memory
* Add support for SVS-VAMANA vector indexing (#4222)
* Add support for SVS-VAMANA vector indexing
* Update VectorAlgo to be Raw-able mitigating '-' in SVS-VAMANA
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* anotate test with @SinceRedisVersion("8.1.240")
* add missing import
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Restore binary compatibility of SetParams (#4225)
* Bump test infra to Redis 8.2 GA (#4232)
* Update snapshot version to 6.2.0 (#4234)
* docs: Improve Javadoc for HostAndPortMapper (#4112) (#4227)
* docs: Improve Javadoc for HostAndPortMapper (#4112)
* docs: Improve Javadoc for HostAndPortMapper (#4112)
* docs: update HostAndPortMapper usage to use DefaultJedisClientConfig (#4112)
* docs: update HostAndMapper advanced-usage.md
* docs: add example use case
* update wordlist
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.junit:junit-bom from 5.13.3 to 5.13.4 (#4216)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Fix JedisBroadcastException in functionLoadReplace for Redis Cluster (#4219)
* Fix JedisBroadcastException in functionLoadReplace
* Clean up PRIMARY_ONLY_COMMANDS initialization
* Fix JedisBroadcastException in FUNCTION commands for cluster
* Broadcast to primary nodes only
PR #3306 introduces broadcasting of commands like FUNCTION DELETE, FUNCTION FLUSH, FUNCTION KILL, FUNCTION RESTORE ... to all nodes of the cluster. This leads to error when command is executed on non-writable (replica) node.
This commit introduces a fix to broadcast the commands only to primary nodes from the cluster.
* format
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Support Redis 8 vector sets #4169 (#4203)
* Initial vector set commit
Add support for
- VRANDMEMBER
- vlinks
- vrem
- vemb
- vcard
- vadd
- vsim
- vdim
* Add UnifiedJedis vadd integration tests
* Add support for reduce dim in vadd
* Add support for vgetattr
* Add support for vsetattr
* Add support for vinfo
* Add VDIM, VCARD integration test
* Add VEMB integration test
* Add VSETATTR/VGETATTR integration test
* Add VLINKS integration test
* Add VRANDMEMBER integration test
* Add VREM integration test
* Add VSIM integration test & refactor
* cleanup
* add missing RawVector
* fix failing tests
* fix PooledExtendedVectorSetCommandsTest
* mark vector-set api as Experimental
- Add integration test for Jedis client
* Fix tests
* clean up
* Address review comments
- remove duplicated DOUBLE_LIST
- reduce code duplication
* fix tests after merge conflict is resolved
* format new files
* Add EPSILON parameter
* fix errors in javadocs (java 8)
* fix errors after rebase
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3 (#4246)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.2 to 3.11.3.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.2...maven-javadoc-plugin-3.11.3)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-version: 3.11.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [vector sets] Support for VSIM WITHATTRIBS (CAE-1421) (#4260)
* [vector sets] Support for VSIM WITHATTRIBS
* [vector sets] Add misisng file
-
* [vector sets] format
* [vector sets] fix tests
- mark tests for WITHATTRIBS with SINCE 8.2.0
- Use JedisByteMap for binary methods
* [vector sets] fix tests
- mark tests for WITHATTRIBS with SINCE 8.2.0
* [vector sets] address review comments
- remove unused import
- remove unused helper methods
* Bump snapshot version to 7.0.0 (#4261) (#4262)
Bump snapshot version to 7.0.0
Related to #4261
* [automatic failover] Automatic failover client improvements (part 1) (#4228)
* Setup test infra for automatic failover tests
* Add toxyproxy
* Add test endpoints
* Add example tests
* [automatic-failover] Enforce formatting for automatic failover codebase (#4176)
* enforce formating for mcf
* enforce formating for mcf
* Trigger integration test jobs feature branches
* [automatic failover] Improve failover resilience by evaluating circuit breaker before retries (#4178)
* fix: Change evaluation order of circuit breaker and retry mechanisms
This commit modifies the order in which circuit breaker and retry mechanisms
are evaluated during failover scenarios. Previously, the circuit breaker was
applied after all retries were exhausted, which could delay failover in
unstable network conditions. Now, the circuit breaker counts each connection
error separately, even during retry attempts.
* format
* format
* use java-8 compatible formater version
* fix AutomaticFailoverTest
* formating
* [automatic-failover] Implement failover retry for in-flight commands (#4175)
* Implement failover retry for in-flight commands
This change adds support for retrying in-flight commands when a Redis connection
fails and the client automatically fails over to another cluster. The feature
is configurable through the FailoverOptions builder.
Key changes:
- Added retryFailedInflightCommands option to FailoverOptions
- Implemented retry logic in CircuitBreakerCommandExecutor
- Added integration tests to verify both retry and no-retry behavior
- Created utility methods for test setup and configuration
This enhancement improves resilience for long-running commands like blocking
operations, allowing them to transparently continue on the failover cluster
without client-side errors.
* Update src/main/java/redis/clients/jedis/mcf/CircuitBreakerCommandExecutor.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
# src/main/java/redis/clients/jedis/mcf/CircuitBreakerCommandExecutor.java
* format
format & clean-up
* fix FailoverIntegrationTest.testInflightCommandsAreNotRetriedAfterFailover
blpop timeout should be less than async command timeout to prevent completing with java.util.concurrent.TimeoutException instead of actuall command failure
* Address comments from review
- rename retryFailedInflightCommands->retryOnFailover
- remove check for CB in OPEN state
* remove unused method
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [automatic-failover] Fix formatting for anticipated AA Failover changes (#4183)
* fix formatting for anticipated failover changes
* additional formatting to cover given folders
* [automatic failover] Implement HealtStatusManager + weighted endpoints (#4189)
* - weighted cluster seleciton
- Healtstatus manager with initial listener and registration logic
- pluggable health checker strategy introduced, these are draft NoOpStrategy, EchoStrategy, LagAwareStrategy,
- fix failing tests impacted from weighted clusters
* - add builder for ClusterConfig
- add echo ot CommandObjects and UnifiedJEdis
- improve StrategySupplier by accepting jedisclientconfig
- adapt EchoStrategy to StrategySupplier. Now it handles the cre…
* Jedis 5.2.0 is released; bump snapshot version to 5.3.0 (#3975)
* DOC-4317 fixed flaky tests (#3984)
* Bump jackson.version from 2.17.2 to 2.18.0 (#3977)
Bumps `jackson.version` from 2.17.2 to 2.18.0.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.17.2 to 2.18.0
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.17.2 to 2.18.0
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump com.kohlschutter.junixsocket:junixsocket-core from 2.10.0 to 2.10.1 (#3978)
Bumps [com.kohlschutter.junixsocket:junixsocket-core](https://github.com/kohlschutter/junixsocket) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/kohlschutter/junixsocket/releases)
- [Commits](https://github.com/kohlschutter/junixsocket/compare/junixsocket-2.10.0...junixsocket-2.10.1)
---
updated-dependencies:
- dependency-name: com.kohlschutter.junixsocket:junixsocket-core
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.6 to 3.2.7 (#3976)
Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.6 to 3.2.7.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.6...maven-gpg-plugin-3.2.7)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.0 to 3.5.1 (#3989)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.0...surefire-3.5.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix JavaDoc warnings (#3990)
* Add javadoc to clear up implicit behavior (#3991)
* add javadoc to clear up implicit behavior
* reword this paragraph
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.10.1 (#3994)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.0...maven-javadoc-plugin-3.10.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix flaky tests with 'await' (#3972)
* fix flaky test - dumy set-get to gain time
* adding same commands for 'simple'
* introdue tryAssert in CSC tests
* remove leftovers
* introduce awaitility for polling
* nit
* fix pipelining test
untilasserted
* Codecove has released beta version of Test Analytics feature (#3996)
* Codecov Test Analytics integration
Codecove has released beta version of Test Analytics feature
more details can be found [here|https://docs.codecov.com/docs/test-result-ingestion-beta]
Since we are already integrated with Codecov (storing code coverage data) the idea is to try out if Test Analytics feature will provide visibility over flaky tests and stability of the tests/build. Hopefully, we will have a base to compare and identify regressions.
Changes (only in build actions)
- Add step to publish junit report files to codecove
- Add basic codecov.yml config (filter out files that are not junit reports)
Conditionally upload junit reports only on nightly build & push to branch
* Remove verbose flag
* Push test results also if job manully triggered
* Update links in README (#3974)
* Mkdocs unify docs (#3999)
* basic mkdocs setup and workflow
* rename workflow
* copy lettuce
* add index
* integrate current wiki and docs content
* integrate current wiki and docs content
* add a few more links
* fix branch in actions
* remove redundant getting started and maven docs
* Revert jedis-maven doc deletion
* Exclude Dockerfile and css from spellcheck
* Fix spelling
* Remove assets from spellcheck-settings.yml
* Add build for dev branch
* Another attempt to fix spellcheck
* Add some words to wordlist
* Add more words to wordlist
* Update .github/workflows/docs.yml
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
---------
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Bump jackson.version from 2.18.0 to 2.18.1 (#4006)
Bumps `jackson.version` from 2.18.0 to 2.18.1.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.0 to 2.18.1
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.0 to 2.18.1
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4 to 5.4.1 (#4009)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4 to 5.4.1.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.4.1/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4...rel/v5.4.1)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* DOC-4345 added JSON search examples for home page (#4010)
* DOC-4345 added JSON search examples for home page
* DOC-4345 made blank lines more consistent
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update src/test/java/io/redis/examples/HomeJsonExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4345 applied feedback
* Update src/test/java/io/redis/examples/HomeJsonExample.java
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* COMMAND INFO reply contains subcommand detail (#4022)
* COMMAND INFO reply contains subcommand detail
* Add 'name' in CommandInfo
Fixes #4020
___
* COMMAND INFO reply contains subcommand detail
* Add 'name' in CommandInfo
* Safeguard test from future ACL subcommands
* Ensure reply size
* Move null checking into COMMAND_INFO_BUILDER from inside loop and reduce parsing 'name' multiple times
* Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.1 to 3.5.2 (#4008)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.1...surefire-3.5.2)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.1 (#4007)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.1 to 3.11.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.1...maven-javadoc-plugin-3.11.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add examples and tutorials page (#4024)
* add exmples and tutorials page
* update wordlist
* Implement command (no arg) (#4026)
* Implement command (no arg)
https://redis.io/docs/latest/commands/command/
Adding it for completeness and as alternative to COMMAND INFO for Redis server prior 7.0.0.
COMMAND (no args) is available with Redis 2.x
COMMAND INFO is available since REDIS version 7.0.0
Relates to: #2922
Support COMMAND commands (#2922)
commit : 35904380a3388721bf27980171e6446b5181c3e8
Closes #793
* Update ControlCommandsTest.java
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Make reply of ACL LOG compatible with older Redis versions (#4030)
* Make reply of COMMAND INFO compatible with older Redis versions (#4031)
* Bump jackson.version from 2.18.1 to 2.18.2 (#4034)
Bumps `jackson.version` from 2.18.1 to 2.18.2.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.1 to 2.18.2
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.1 to 2.18.2
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* DOC-4560 pipe/transaction examples for docs (#4038)
* DOC-4560 pipe/transaction examples for docs
* Update src/test/java/io/redis/examples/PipeTransExample.java
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.1 to 3.11.2 (#4039)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.1 to 3.11.2.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.1...maven-javadoc-plugin-3.11.2)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Token based authentication integration with core extension (#4011)
* tba draft
* - stop authxmanager on pool close
- swith to long dates
* drop use of authxmanager and authenticatedconnection from core
* -update submodule ref
-change exception message
* - remove submodule
- update dependency
* back to current version
* - move autxhmanager creation to user space
- introduce authenticationeventlisteners
- clenaup in connectionpool
- add entraidtestcontext
- add redisintegrationtests
- fix failing tokenbasedauthentication unit&integ tests
* - prevent use of pubsub with TBA+RESP2 combination
- fix flaky test
* - support tba with clusters
- add cluster+tba tests
* - remove onerror from authxmanager
- fix flaky tests
* - fix flaky test
* fix renewalDuringOperationsTest
* -reviews from @sazzad16
* - fix config for managedIdentity
- set audiences with scopes
- managed identity tests
* review from @ggivo
- use getuser instead oid from Token
* handle and propogate from unsuccessful AUTH response
* adding reauth support for both pubsub and shardedpubsub
* fix ping issue with pubsub
* - review from @sazzad16 : make JedisSafeAuthenticator protected
- fix failing unit tests
* update authx version
* - remove workaround for standalone endpoint
* Minor fix with Token-Based-Authentication integration tests (#4044)
- set endpoint for entraid cluster intg tests
- enable networkpartition tests
* Add SslOptions (#3980)
Similar to SslOptions in Lettuce library.
---
* Add SslOptions from Lettuce library
* Add InsecureTrustManagerFactory from Netty library
* Separate SSL socket creation in DefaultJedisSocketFactory
* Add SslOptions in JedisClientConfig
* Add SslHostnameVerifyMode
inspired by SslVerifyMode in Lettuce
* Allow system default key and trust managers and insecure trust manager
* fix jdoc
* Address review comments
* Revert back to verification mode names in Lettuce,
to avoid confusion at this moment.
* Rename insecureTrust to noTruststoreVerification;
does this reduce confusion?
* SslVerifyMode is renamed back
and INSECURE option (renamed from NONE) is added back in SslVerifyMode.
* Remove InsecureTrustManagerFactory
* Disable ALL existing SSL tests
* JedisTest with SslOptions
* SSLACLJedisTest with SslOptions
* SSLOptionsJedisSentinelPoolTest with SslOptions
* SSLJedisClusterTest with SslOptions
* TODO comment to enable existing SSL tests
* TODO command to enable existing SSL tests in csc package
* Enable existing SSL tests without impacting new ones
* Missing enable existing SSL tests without impacting new ones
* Keep only Builder pattern constructor for DefaultJedisClientConfig
* Limit HostnameVerifier only for legacy ssl config
and document as JavaDoc in JedisClientConfig
* Remove unused codes from SSLOptionsJedisTest
* Increase code reuse for LocalhostVerifier
* Individual JavaDoc for each SslVerifyMode
* Custom SocketFactory won't be supported with SslOptions
* Deprecate DefaultJedisClientConfig.copyConfig()
* Add option to set SSLContext protocol
* Remove options to set KeyManager and TrustManager algorithms
* Add File checkers
* minor user/password change
* minor update javadoc
* Allow manual HostnameVerifier with SslOptions
* Make test connectWithCustomHostNameVerifier() pass
* Better SslOptions with custom HostnameVerifier
in connectWithCustomHostNameVerifier() test
* Shorten sslContextProtocol to sslProtocol
* Use null as default password,
unlike Lettuce where it uses empty char array.
* Make an accidental private truststore builder option public
* Remove Lettuce comments
* Add JedisPooled tests
* Use char array for password
* Remove file license
* Address code review
* Merge fix
* Deprecate helper methods in DefaultJedisClientConfig
* DOC-4450 added hgetall and hvals command examples (#4050)
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Remove List tests asserting timeouts (#4051)
As a client library, it should be enough to send the command arguments and get & parse the reply properly.
* Introduces test matrix based on Redis versions [8.0-M02, 7.4.1, 7.2.6, 6.2.16] (#4015)
* Introduces test matrix based on Redis versions [8.0-M1, 7.4.1, 7.2.6, 6.2.16]
Use docker composer to bring up the test env using `redislabs/client-libs-test` image.
When run against older Redis version some tests are using commands available only in newer Redis server versions. To resolve this we are introducing two new annotations/rules
- Introduce `SinceRedisVersion` annotation/Rule - for conditionally running tests based on Redis server version contacted
- Introduce `EnableOnCommad` annotation/Rule - for conditionally running tests based on command availability on the server
And mark respective tests with the least Redis Version required by the test
- SinceRedisVersion ("7.4.0") - Mark tests using commands/modifiers introduced with Redis 7.4.0
- SinceRedisVersion ("7.2.0") - Mark tests using commands/modifiers introduced with Redis 7.2.0
- SinceRedisVersion ("7.0.0") - Mark tests using commands/modifiers introduced with Redis 7.0.0
The same approach used to mark CSC tests
- Disabled client-side caching tests for versions below 7.4
- Test env migrated to use native Redis server TLS instead of using stunnel
Not all tests were migrated
- Disable Modules test in containerized test env ModuleTest uses custom test module to test load/unload/sendCommand.
Requires pre-build test module on the same os like test container to avoid errors
- Disable UDS tests in containerized test env
No easy way to make unix sockets work on MAC with docker
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Fix sporadic test failing with OOM (#4053)
* Attempt to fix sporadic test failing with OOM
Troubleshooting flaky test failing with OOM
* Authx.close() in try/finally
* Configure retention for uploaded heap dumps to 5days
remove PrintFlagsFinal to avoid warning in buld logs
* format TokenBasedAuthenticationUnitTests
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4495 sadd and smembers examples (#4052)
* DOC-4495 sadd and smembers examples
* DOC-4495 tidied formatting
* Apply suggestions from code review
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4475 examples for llen, lpop, lpush, lrange, rpop, and rpush (#4054)
* Format DOC examples
* Use v4 of upload artifact (#4061)
* Upgrade GitHub Python artifact for Publish Docs (#4062)
* Use v3 of GitHub upload-pages-artifact for Publish Docs (#4063)
* Use v3 of GitHub deploy-pages for Publish Docs (#4064)
* Revert failing GitHub artifacts for Publish Docs (#4065)
* Revert "Use v3 of GitHub upload-pages-artifact for Publish Docs (#4063)"
This reverts commit aee2ddf87bdc69753b20d34ffa8cc52b1ffe4791.
* Revert "Use v3 of GitHub deploy-pages for Publish Docs (#4064)"
This reverts commit 2e06aea00873209a95b7e2441fa5e7076c981c93.
* DOC-4440 added auth command examples using Jedis class (#4058)
* DOC-4440 added placeholder for auth command examples
* DOC-4440 added auth command examples using Jedis class
* DOC-4732 added geo index examples (#4059)
* DOC-4732 added geo index examples
* DOC-DOC-4732 fixed problem reported in feedback
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Update actions/checkout, actions/setup-java and codecov/codecov-action (#4066)
* DOC-4445 server management command examples (#4056)
* DOC-4445 server management command examples
* DOC-4445 implemented info command example with Jedis class
* Apply suggestions from code review
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* DOC-4445 implemented feedback
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Fix TBA cluster integration tests (#4068)
* - fix cluster int tests
- add entraid integ tests
- fix ConcurrentModification
* fix ConcurrentModification with RedisEntraIDClusterIntegrationTests.testClusterWithReAuth
* Test with 8.0-M04-pre (#4069)
* Test with 8.0-M03-pre
* Test with 8.0-M03-pre
* Test with 8.0-M03
* Test with 8.0-M04-pre
* SearchDefaultDialectTest.testDialectsWithFTExplain
Output of ft.explain has changed in Redis 8.0.
Existing Jedis client ftExplain() API returns the raw output and does not perform any parsing/mapping, hence updating the test to verify only for received output when used with correct dialect & gets syntax error otherwise.
* Update testAggregationBuilderAddScores test to match change in SEARCH module replacing default SCORER from TF-IDF to BM25.
* Apply suggestions from code review
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Address review comments
* Update SearchDefaultDialectTest.java
* Output of ft.explain has changed in Redis 8.0.
Existing Jedis client ftExplain() API returns the raw output and does not perform any parsing/mapping, hence updating the test to verify only for received output when used with correct dialect & gets syntax error otherwise.
* minor changes: format, private, unused variable, etc.
---------
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
* Test modules ACL support (#4042)
* Test HASH module ACL support
* Add version rule
* Test modules acl categories
* Test according to design doc with Redis 8.0-M03
* Based on RedisModuleCommandsTestBase
* Test modules CONFIG support (#4043)
* Test SEARCH module CONFIG support
* Test according to design doc with Redis 8.0-M03
* Set the version rule
* Deprecate FT.CONFIG command and keyworkds
* Shorten file name
* fix typo
* Redis 8.0-M03 image reports the version as 7.9.226
* Redis 8.0-M04-pre restored defaults
* Based on RedisModuleCommandsTestBase
* close resource
* Remove SearchConfigTest (#4072)
All the 'Test's are already 'Ignore'd, due to unavailability/instability of FT.CONFIG command.
* Support warning messages in search/aggregation query results (#3958)
* Support warning messages in search/aggregation query results
* private constructor
* Enable respective Test
* add test rule
* Remove Triggers and Functions feature (#3969)
* Change FT.PROFILE to return generic object (#4067)
* Change FT.PROFILE to return generic object
* Handle FT.PROFILE Results for both Redis 7 and 8
* Remove Graph module support (#4073)
* Bump to 6.0.0 snapshot
* Use v2 of GitHub upload-pages-artifact for Publish Docs
* Use v3 of GitHub upload-pages-artifact for Publish Docs
* Use v4 of GitHub deploy-pages for Publish Docs
* Use v4 of few GitHub actions workflow artifacts (#4075)
These include:
- checkout
- setup-java
- cache
* Running doctests on master branch
Docs are now written in master branch instead of emb-examples branch.
* Fix the Java example code for Lists using RPUSH (#4074)
* fixing the Java code to match the redis cli example and the context
* fixing the tests
---------
Co-authored-by: Mohamed Sanaulla <msanaulla@gso.org.sa>
* Bump org.apache.commons:commons-pool2 from 2.12.0 to 2.12.1 (#4080)
Bumps org.apache.commons:commons-pool2 from 2.12.0 to 2.12.1.
---
updated-dependencies:
- dependency-name: org.apache.commons:commons-pool2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4.1 to 5.4.2 (#4081)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4.1 to 5.4.2.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.4.2/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4.1...rel/v5.4.2)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump com.google.code.gson:gson from 2.11.0 to 2.12.1 (#4082)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.11.0 to 2.12.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.11.0...gson-parent-2.12.1)
---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.json:json from 20240303 to 20250107 (#4049)
Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20240303 to 20250107.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)
---
updated-dependencies:
- dependency-name: org.json:json
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update redisjson.md (#4083)
* Update redisjson.md
* Update docs/redisjson.md
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix pubsub when cache enabled (#4086)
* fix pubsub when cache enabled
* polish
* Make default client side search dialect to 2 (#4060)
* Make default client side search dialect to 2
* Fix tests
* Extend EXECABORT with "previous errors" #4084 (#4090)
Propagate errors in transaction on command queuing (e.g before actual EXEC).
Errors are added as suppressed exceptions when EXEC is processed.
https://redis.io/docs/latest/develop/interact/transactions/
-A command may fail to be queued, so there may be an error before EXEC is called. For instance the command may be syntactically wrong (wrong number of arguments, wrong command name, ...), or there may be some critical condition like an out of memory condition (if the server is configured to have a memory limit using the maxmemory directive).
closes #4084
* [code cleanup] Jedis client to implement CommandCommands interface (#4077)
[code cleanup] Jedis client to implment CommandCommands interface
When support for COMMAND was added we have missed to add the interface to Jedis client itself
* Enforce code style format (#4087)
* start enforcing format style
* adding format_check
* dummy change
* fix file param
* Create format_check.yml
* workflow_dispatch
* Update format_check.yml
* setup java 11
* add fetch origin
* process list of files
* changes into a file
* Revert "dummy change"
This reverts commit ce6314a5bb95291251163f7252f8f3038e23a0e5.
* Check changed files against different branches
* Support INFO command in UnifiedJedis (simplified) (#4079)
* Support INFO command in UnifiedJedis
* test in cluster
* Support INFO command in UnifiedJedis (simplified)
* fix test
* Update after discussion
* codestyle
* Bump org.awaitility:awaitility from 4.2.2 to 4.3.0 (#4099)
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.2 to 4.3.0.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.2...awaitility-4.3.0)
---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-compiler-plugin from 3.13.0 to 3.14.0 (#4097)
Bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.13.0 to 3.14.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Basic documention for TBA support with some examples (#4102)
* tba doc
* fix sub headers
* fix spellcheck
* updates with suggestions from @uglide
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* review from @ggivo
---------
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* Propagate cause for "Cluster retry deadline exceeded" exception (#4103)
* Bump net.revelc.code.formatter:formatter-maven-plugin from 2.11.0 to 2.16.0 (#4098)
* Bump net.revelc.code.formatter:formatter-maven-plugin
Bumps net.revelc.code.formatter:formatter-maven-plugin from 2.11.0 to 2.25.0.
---
updated-dependencies:
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update pom.xml
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Update stale issue workflow (#4101)
* Update stale issue workflow
- Mark issue as stale only if marked with waiting-for-feedback
- Do not mark issue/PR as stale if mareked with feedback-provided
- Do not mark issue as stale if assigned to milestone
* Update days-before-stale: 30, days-before-close: 30
* Fix JedisURIHelper.getPassword throwing ArrayIndexOutOfBoundsException for username-only URIs (#4109)
Fix for bug #4003. Better message instead of ArrayIndexOutOfBoundsException
Authentication details can be provided in the URI in the form of a username and password.
Examples :
- Username and Password: redis://username:password@host:port
- Password-only: redis://:password@host:port
- No Authentication: redis://host:port
- Empty password: redis://username:@host:port
Using JedisURIHelper with a URI having only a username is considered invalid and should throw `IllegalArgumentException`.
Closes #4003.
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Update redis server test versions (#4114)
Bump test infra to use 8.0-M05-pre
* Test support for DefaultAzureCredential (#4113)
* test support for DefaultAzureCredential
* bump entraid version
* Support for new HFE API, hgetdel hgetex hsetex commands (#4095)
* support for hgetdel hgetex hsetex
* add commands to wordlist
* changes for review from @ggivo
- make base class abstract package private
- deprecate keepttl
* adding java doc for elements in new HFE API
* unifiedjedis java doc for new hfe api
* fix test cases for new HFE API
* move javadoc to interface
* Fix failing network partition test (#4118)
* fix network partition test for possible long duration of fault injection
assert with multiple expected msg
* wait for working connection
* Add tests for getSet() with Parameters (#4127)
Add tests for getSet() with Parameters #4100
* Add tests for vector search INT8/UINT8 types (#4091)
* Bump jackson.version from 2.18.2 to 2.18.3 (#4106)
Bumps `jackson.version` from 2.18.2 to 2.18.3.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.2 to 2.18.3
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.2 to 2.18.3
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Link Jedis 5 migration guide in mkdocs (#4076)
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Document pgp keys (#4125)
* [#3125] Document pgp keys
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix spellcheck
* Fix spellcheck
* Move to docs
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update verifying content doc (#4133)
Replace MIT keyserver links with keyserver.ubuntu.com because of bad performance of MIT key server
* Fix failing ModuleTest & test against 8.0-RC1-pre (#4131)
* Test against 8.0-RC1-pre
* ftSearch() Error message updated to "No such index"
In Redis 8.0.0 error message is updated from "no such index" to "No such index"
* Redis 8.0 comes with vectorset module by default
* Update "Pipelines and transactions" doc example to include pipeline.close() (#4134)
* Update pipeline/transaction examples in documentation to ensure proper transaction/pipeline resource closure
closes #4132
* Update src/test/java/io/redis/examples/PipeTransExample.java
Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
---------
Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
* Fix flaky test JedisPoolTest.testCloseConnectionOnMakeObject (#4138)
* Fix flaky test
* Using await as recommend
* Update ACLJedisPoolTest
* Missing perform request for connection
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Migrate test to JUnit5 (#4139)
* Use junit5 for new test
Add juint5 dependencies to enable writing new tests using juint5
Added junit.vintage module to make sure existing junit4 tests are running till we migrate them.
Migrated BuilderTest.java as example
* Add Junit5 Conditions
- RedisVersionCondition
- EnabledOnCommandCondition
* Refactor junit conditions to use AnnotationUtils
- RedisVersionCondition
- EnabledOnCommandCondition
* Migrate commands.commandobjects tests
* Rebase
* Migrate collections tests
* junit 5.13.0-M1 introduces support for parameterised Class tests
* Migrate redis.clients.jedis to JUnit5
* clean up warnings
* Migrate commands/unified tests
* Delete EnabledOnCommandRule.java
* migrate ExceptionsTest
* migrate csc tests
* migrate misc tests
* migrate authentication tests
* migrate examples tests
* migrate mocked tests
* Migrate module tests
* Migrate parameters tests
* Migrate prefix tests
* Migrate providers tests
* Migrate scenariou & remaining tests
* Migrate examples tests
* Remove junit4 & junit-vintage
* Clean up
* Use mockito-junit-jupiter:4.11.0 for java 1.8 compatibility
* Rebase
* Fix ACLJedisPoolTest, ACLJedisSentinelPoolTest tests
* Fix ACLJedisSentinelPoolTest tests
* Fix for connectionAuthWithExpiredTokenTest (#4142)
fix for connectionAuthWithExpiredTokenTest
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4.2 to 5.4.4 (#4153)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4.2 to 5.4.4.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.4.4/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4.2...rel/v5.4.4)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-version: 5.4.4
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Speed up cluster tests (#4150)
* Bump org.jacoco:jacoco-maven-plugin from 0.8.12 to 0.8.13 (#4137)
Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.12 to 0.8.13.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.12...v0.8.13)
---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
dependency-version: 0.8.13
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.2 to 3.5.3 (#4136)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-version: 3.5.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* DOC-5110 added hash search examples (#4151)
* DOC-5110 added hash search examples
* Java 8 compatibility
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump test infra to 8.0-RC2 (#4155)
* Run pipeline in current thread if all the keys on same node (#4149)
* perf:last node run in current thread directly
* fix: connection leak, we should return it to connection pool
* noop sync when pipelinedResponses.isEmpty()
* revert rename
* clean
* remove last node run in current thread when multi node
* add test for pipeline all keys at same node
* fix: make all keys on same node
* formatting
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump version to 6.1.0-SNAPSHOT after 6.0.0 release (#4157)
* Bump integration branch to next release (6.1.x)
* Update README.md
* Bump com.google.code.gson:gson from 2.12.1 to 2.13.1 (#4161)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.12.1 to 2.13.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.12.1...gson-parent-2.13.1)
---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
dependency-version: 2.13.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.junit:junit-bom from 5.13.0-M1 to 5.13.0-RC1 (#4168)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.13.0-M1 to 5.13.0-RC1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0-M1...r5.13.0-RC1)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.0-RC1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump jackson.version from 2.18.3 to 2.19.0 (#4160)
Bumps `jackson.version` from 2.18.3 to 2.19.0.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.3 to 2.19.0
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-version: 2.19.0
dependency-type: direct:development
update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-version: 2.19.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add binary stream support for XREAD and XREADGROUP (#3566) (#4152)
* Add binary stream support for XREAD and XREADGROUP (#3566)
- Created StreamEntryBinary class to support binary data with Map<byte[], byte[]>
- Added xreadBinary, xreadBinaryAsMap, xreadGroupBinary, and xreadGroupBinaryAsMap methods to StreamBinaryCommands
- Implemented binary stream builders in BuilderFactory
- Added implementation in Jedis and UnifiedJedis classes
- Created BinaryStreamEntryTest to verify binary stream functionality
* Add parameterized binary stream tests for RESP2/RESP3 in Jedis, Cluster, and Pooled clients TEST (#3566)
- Introduce `BinaryStreamEntryTest` and `BinaryStreamsCommandsTestBase` following the unified test pattern
- Add `ClusterBinaryStreamsCommandsTest` and `PooledBinaryStreamsCommandsTest` to cover JedisCluster and JedisPooled
- Parameterize tests to run under both RESP2 and RESP3 protocols
- Format BuilderFactory to conform to project formatter rules
* Switch to StreamEntryID in binary stream tests and add illegal UTF-8 sequence test (#3566)
- Refactor StreamsBinaryCommandsTest: replace Map.Entry<byte[], byte[]> with Map.Entry<byte[], StreamEntryID> for xreadBinary, xreadBinaryAsMap, xreadGroupBinary and related methods
- Update tests to assert on StreamEntryBinary IDs and byte-array payloads accordingly
- Add a new test case covering an illegal UTF-8 sequence (0xc3 0x28) to validate correct binary handling (issue #3566)
* Add Map<byte[], StreamEntryID> support and binary stream tests (#3566)
- Introduce a Map<byte[], StreamEntryID> parameter for binary stream commands
- Duplicate all existing test cases for xread, xreadAsMap, xreadGroup and xreadGroupAsMap from StreamsCommandsTest.java and replace them with xreadBinary, xreadBinaryAsMap, xreadGroupBinary and xreadGroupBinaryAsMap in StreamsBinaryCommandsTest
* Modify Map<byte[], StreamEntryID> support and binary stream tests (#3566)
- Duplicate all existing test cases for xread, xreadAsMap, xreadGroup and xreadGroupAsMap from StreamsCommandsTest.java and replace them with xreadBinary, xreadBinaryAsMap, xreadGroupBinary and xreadGroupBinaryAsMap in StreamsBinaryCommandsTest
* Add JedisByteMap implementation (#3566)
- Implemented a new JedisByteMap<T> class similar to the existing JedisByteHashMap to properly handle byte array keys in Map<byte[], T> operations
- This implementation ensures that `get(byte[])` operations work correctly by using proper byte array equality comparison instead of reference comparison
- Fixes issues when using byte arrays as keys in stream-related operations
* Add JedisByteMapTest (#3566)
- Added tests for JedisByteMap similar to existing JedisByteHashMap tests
* Changed Map<byte[], byte[]> in STREAM_ENTRY_BINARY_LIST to JedisByteHashMap (#3566)
- Changed Map<byte[], byte[]> in STREAM_ENTRY_BINARY_LIST to JedisByteHashMap.
* Remove varargs alternatives
There is already discrepancy in API between
`xread` binary variant & `xread` string one.
Binary one accepts varargs for requested streams, while the string variant expects them to be provided as `Map`.
Going forward xread binary methods should use Map. This commit also marks existing `List<Object> xread` one as deprecated in favor of newly introduced methods
for type safety and better stream entry parsing.
* Add xreadBinary and xreadGroupBinary methods to PipelineBase
* Deprecate List<Object> xreadXXX in favor of newly introduced typed methods
* Clean up
* Java docs
* STREAM_ENTRY_BINARY not used
* Fix BinaryStreamEntryTest test
* Add BinaryStreamsPipeline tests
Added tests to cover Pipeline command executions.
UnifiedJedis BinaryStreamsCommand test clean up and attempt to simplify focused on testing xreadBinary and xreadGroupBinary methods .
* Test cleanup & formating
* Merged & refactored a bit Jedis BinaryStreamEntryTest.java & StreamsBinaryCommandsTest to match UnifiedJedis StreamsBinaryCommandsTestBase.
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Update README.md (#4143)
* slight rewording in README.md
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Add retryable command execution example (#3780)
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix flaky tests in DocumentTest (#3617)
* Fix flaky tests in DocumentTest
* toString() tested only in dedicated test
* formating
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.apache.httpcomponents.client5:httpclient5-fluent from 5.4.4 to 5.5 (#4170)
Bump org.apache.httpcomponents.client5:httpclient5-fluent
Bumps [org.apache.httpcomponents.client5:httpclient5-fluent](https://github.com/apache/httpcomponents-client) from 5.4.4 to 5.5.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/master/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.4.4...rel/v5.5)
---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5-fluent
dependency-version: '5.5'
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.json:json from 20250107 to 20250517 (#4171)
Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20250107 to 20250517.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)
---
updated-dependencies:
- dependency-name: org.json:json
dependency-version: '20250517'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.junit:junit-bom from 5.13.0-RC1 to 5.13.1 (#4174)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.13.0-RC1 to 5.13.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0-RC1...r5.13.1)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update test infra to use latest Redis (#4179)
* Update test infra to use latest Redis
* Bump jackson.version from 2.19.0 to 2.19.1 (#4180)
Bumps `jackson.version` from 2.19.0 to 2.19.1.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.19.0 to 2.19.1
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-version: 2.19.1
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-version: 2.19.1
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add a test to verify failover on DNS unresolvable host error (#4182)
* Add a test to verify failover on DNS unresolvable host error
* formating
* address review comments
* Fix:JedisCluster throws NullPointerException when maxAttempts is set to 0 (#4186)
* Fix: JedisCluster throws NullPointerException when maxAttempts is set to 0
This change adds input validation to the RetryableCommandExecutor constructor to prevent usage with invalid configuration values, specifically when maxAttempts is set to 0.
Previously, setting maxAttempts to 0 in JedisCluster would result in a NullPointerException during command execution, due to lastException being uninitialized when no attempt is made. With this fix, an IllegalArgumentException is thrown early if maxAttempts < 1, providing clearer feedback to the user and preventing runtime errors.
Added unit tests to verify the validation behavior.
Fixes #4185
Co-authored-by: shivincible <shivangi.gupta.jiit@gmail.com>
* DOC-5227 added probabilistic data type examples (#4184)
* DOC-5227 added probabilistic data type examples
* DOC-5227 replaced Map.of() calls
* DOC-5227 fixed example output comment
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Bump org.junit:junit-bom from 5.13.1 to 5.13.2 (#4192)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.1 to 5.13.2.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.7 to 3.2.8 (#4197)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
dependency-version: 3.2.8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Migrate publishing to Maven Central Portal (#4199)
* Migrate publishing to Maven Central Portal
* Clean up scm section in pon.xml
* Add Support for New BITOP Operations in Redis 8.2 (#4188) (#4190)
* Add Support for New BITOP Operations in Redis 8.2 (#4188)
This PR adds support for the new BITOP operations introduced in Redis Community Edition 8.2: DIFF, DIFF1, ANDOR, and ONE.
Changes
- Added new enum values to BitOP.java for the new operations: DIFF, DIFF1, ANDOR, and ONE
- Updated tests in BitCommandsTest.java and BitCommandsTestBase.java to verify the new operations
New Operations
- DIFF(X, Y1, Y2, ...): Members of X that are not members of any of Y1, Y2, ...
Equivalent to: X ∧ ¬(Y1 ∨ Y2 ∨ ...)
- DIFF1(X, Y1, Y2, ...): Members of one or more of Y1, Y2, ... that are not members of X
Equivalent to: ¬X ∧ (Y1 ∨ Y2 ∨ ...)
- ANDOR(X, Y1, Y2, ...): Members of X that are also members of one or more of Y1, Y2, ...
Equivalent to: X ∧ (Y1 ∨ Y2 ∨ ...)
- ONE(X1, X2, ...): Members of exactly one of X1, X2, ...
For two bitmaps, this is equivalent to XOR(X1, X2)
For more than two bitmaps, this represents elements that appear in exactly one input
Closes #4188
* Apply suggestions from code review
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* format new bitop tests
* Bump of test infra to use Redis 8.2 will be handled with separate PR
* format
---------
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* Bump org.junit:junit-bom from 5.13.2 to 5.13.3 (#4198)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Fix flaky test ClientCommandsTest.killSkipmeYesNo (#4206)
* Fix flaky test ClientCommandsTest.killSkipmeYesNo
* Format the file
* revert formatting only changes
* improve test failure reporting
* fix test condition
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix memory leak in JedisClusterInfoCache - replica nodes not cleared (#4205)
* Update reset on JedisClusterInfoCache
* Fix the test
Try to run mvn formatter:format
Try to format the file
Revert "Try to format the file"
This reverts commit 535c05186e34a4f096aa4945ceae9ec0a0f6fca3.
Format ControlCommandsTest
* Add unit test for JedisClusterInfoCache
Add test to ensure that the cluster info cache correctly manages replica nodes after topology changes and resets.
- Added scenarios to test rediscovery of cluster nodes and slots, especially handling the removal and reappearance of replica nodes.
- Enhanced unit tests to verify that calling reset() properly clears replica slot information.
* revert formating only changes
* format updated code
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump jackson.version from 2.19.1 to 2.19.2 (#4208)
Bumps `jackson.version` from 2.19.1 to 2.19.2.
Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.1 to 2.19.2
- [Commits](https://github.com/FasterXML/jackson/commits)
Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.19.1 to 2.19.2
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-version: 2.19.2
dependency-type: direct:development
update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
dependency-version: 2.19.2
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add 8.2 to test matrix (#4195)
Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
* Check formatting only for new files (#4212)
* Add support for new stream commands (#4211)
* Add support for new stream commands
- Add support for xackdel and xdelex
- Extend xadd and xtrim
- Add relevant tests
* Clean up tests
* Rename StreamTrimMode and StreamTrimResult
StreamTrimMode -> StreamDeletionPolicy
StreamTrimResult -> StreamEntryDeletionResult
* Fix formatting in new files
* fix doc comments formatting
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Fix test coverage generation (#4213)
* Fix test coverage generation
* Keep the JVM_OPTS
* Align codecov config with lettuce (#4214)
- Enable coverage reporting for PRs
- Add defaults
* DOC-5471 time series doc examples (#4210)
* DOC-5471 time series doc examples
* DOC-5471 added REMOVE section around initial key deletions
* DOC-5471 added TSElement import to fix CI errors
* DOC-5471 replaced Map.entry with AbstractMap.SimpleEntry<> for compatibility
* DOC-5471 fixed a few remaining instances of Map.entry
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Bump 8.2 test infra to 8.2-rc1 (#4215)
* Clarify why new stream entries aren't deleted with XDELEX (#4218)
* Improve naming for status 2 in StreamEntryDeletionResult
* Clarify why new stream entries aren't deleted with XDELEX
* Fix formatting of StreamEntryDeletionResultTest
* verify against redis 8.2-rc2-pre (#4221)
* verify against redis 8.2-rc2-pre
* Update ControlCommandsTest.memoryUsageBinary to match reduced memory usage
Seems latest 8.2 redis version consumes less memory
* Add support for SVS-VAMANA vector indexing (#4222)
* Add support for SVS-VAMANA vector indexing
* Update VectorAlgo to be Raw-able mitigating '-' in SVS-VAMANA
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* anotate test with @SinceRedisVersion("8.1.240")
* add missing import
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Restore binary compatibility of SetParams (#4225)
* Bump test infra to Redis 8.2 GA (#4232)
* Update snapshot version to 6.2.0 (#4234)
* docs: Improve Javadoc for HostAndPortMapper (#4112) (#4227)
* docs: Improve Javadoc for HostAndPortMapper (#4112)
* docs: Improve Javadoc for HostAndPortMapper (#4112)
* docs: update HostAndPortMapper usage to use DefaultJedisClientConfig (#4112)
* docs: update HostAndMapper advanced-usage.md
* docs: add example use case
* update wordlist
---------
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
* Bump org.junit:junit-bom from 5.13.3 to 5.13.4 (#4216)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)
---
updated-dependencies:
- dependency-name: org.junit:junit-bom
dependency-version: 5.13.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Fix JedisBroadcastException in functionLoadReplace for Redis Cluster (#4219)
* Fix JedisBroadcastException in functionLoadReplace
* Clean up PRIMARY_ONLY_COMMANDS initialization
* Fix JedisBroadcastException in FUNCTION commands for cluster
* Broadcast to primary nodes only
PR #3306 introduces broadcasting of commands like FUNCTION DELETE, FUNCTION FLUSH, FUNCTION KILL, FUNCTION RESTORE ... to all nodes of the cluster. This leads to error when command is executed on non-writable (replica) node.
This commit introduces a fix to broadcast the commands only to primary nodes from the cluster.
* format
---------
Co-authored-by: Ivo Gaydazhiev <ivo.gaydazhiev@redis.com>
* Support Redis 8 vector sets #4169 (#4203)
* Initial vector set commit
Add support for
- VRANDMEMBER
- vlinks
- vrem
- vemb
- vcard
- vadd
- vsim
- vdim
* Add UnifiedJedis vadd integration tests
* Add support for reduce dim in vadd
* Add support for vgetattr
* Add support for vsetattr
* Add support for vinfo
* Add VDIM, VCARD integration test
* Add VEMB integration test
* Add VSETATTR/VGETATTR integration test
* Add VLINKS integration test
* Add VRANDMEMBER integration test
* Add VREM integration test
* Add VSIM integration test & refactor
* cleanup
* add missing RawVector
* fix failing tests
* fix PooledExtendedVectorSetCommandsTest
* mark vector-set api as Experimental
- Add integration test for Jedis client
* Fix tests
* clean up
* Address review comments
- remove duplicated DOUBLE_LIST
- reduce code duplication
* fix tests after merge conflict is resolved
* format new files
* Add EPSILON parameter
* fix errors in javadocs (java 8)
* fix errors after rebase
* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3 (#4246)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.11.2 to 3.11.3.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.11.2...maven-javadoc-plugin-3.11.3)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-version: 3.11.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [vector sets] Support for VSIM WITHATTRIBS (CAE-1421) (#4260)
* [vector sets] Support for VSIM WITHATTRIBS
* [vector sets] Add misisng file
-
* [vector sets] format
* [vector sets] fix tests
- mark tests for WITHATTRIBS with SINCE 8.2.0
- Use JedisByteMap for binary methods
* [vector sets] fix tests
- mark tests for WITHATTRIBS with SINCE 8.2.0
* [vector sets] address review comments
- remove unused import
- remove unused helper methods
* Bump snapshot version to 7.0.0 (#4261) (#4262)
Bump snapshot version to 7.0.0
Related to #4261
* [automatic failover] Automatic failover client improvements (part 1) (#4228)
* Setup test infra for automatic failover tests
* Add toxyproxy
* Add test endpoints
* Add example tests
* [automatic-failover] Enforce formatting for automatic failover codebase (#4176)
* enforce formating for mcf
* enforce formating for mcf
* Trigger integration test jobs feature branches
* [automatic failover] Improve failover resilience by evaluating circuit breaker before retries (#4178)
* fix: Change evaluation order of circuit breaker and retry mechanisms
This commit modifies the order in which circuit breaker and retry mechanisms
are evaluated during failover scenarios. Previously, the circuit breaker was
applied after all retries were exhausted, which could delay failover in
unstable network conditions. Now, the circuit breaker counts each connection
error separately, even during retry attempts.
* format
* format
* use java-8 compatible formater version
* fix AutomaticFailoverTest
* formating
* [automatic-failover] Implement failover retry for in-flight commands (#4175)
* Implement failover retry for in-flight commands
This change adds support for retrying in-flight commands when a Redis connection
fails and the client automatically fails over to another cluster. The feature
is configurable through the FailoverOptions builder.
Key changes:
- Added retryFailedInflightCommands option to FailoverOptions
- Implemented retry logic in CircuitBreakerCommandExecutor
- Added integration tests to verify both retry and no-retry behavior
- Created utility methods for test setup and configuration
This enhancement improves resilience for long-running commands like blocking
operations, allowing them to transparently continue on the failover cluster
without client-side errors.
* Update src/main/java/redis/clients/jedis/mcf/CircuitBreakerCommandExecutor.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
# src/main/java/redis/clients/jedis/mcf/CircuitBreakerCommandExecutor.java
* format
format & clean-up
* fix FailoverIntegrationTest.testInflightCommandsAreNotRetriedAfterFailover
blpop timeout should be less than async command timeout to prevent completing with java.util.concurrent.TimeoutException instead of actuall command failure
* Address comments from review
- rename retryFailedInflightCommands->retryOnFailover
- remove check for CB in OPEN state
* remove unused method
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [automatic-failover] Fix formatting for anticipated AA Failover changes (#4183)
* fix formatting for anticipated failover changes
* additional formatting to cover given folders
* [automatic failover] Implement HealtStatusManager + weighted endpoints (#4189)
* - weighted cluster seleciton
- Healtstatus manager with initial listener and registration logic
- pluggable health checker strategy introduced, these are draft NoOpStrategy, EchoStrategy, LagAwareStrategy,
- fix failing tests impacted from weighted clusters
* - add builder for ClusterConfig
- add echo ot CommandObjects and UnifiedJEdis
- improve StrategySupplier by accepting jedisclientconfig
- adapt EchoStrategy to StrategySupplier. Now it handles the cre…
Pull Request Overview
Adds support for Redis 8 vector set commands across unified, pooled, and cluster clients, including new test coverage and API interfaces.
VectorTestUtils,VectorSetCommandsTestBase,ExtendedVectorSetCommandsTestBase).VectorSetCommands,VectorSetBinaryCommands,VectorSetPipelineCommands,VectorSetPipelineBinaryCommands) and integrates them into existing pipelines and Jedis command surfaces.createTestClientpattern and remove manual tear-down logic.Closes #4169