forked from redis/jedis
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Resolve merge conflict for Cross cluster failover #2
Merged
aterleto
merged 36 commits into
aterleto:master
from
sazzad16:aterleto-cross-cluster-failover
Apr 17, 2023
Merged
Resolve merge conflict for Cross cluster failover #2
aterleto
merged 36 commits into
aterleto:master
from
sazzad16:aterleto-cross-cluster-failover
Apr 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Created new CircuitBreakerCommandExecutor to leverage new retry and circuit breaker capability for failover - Created new MultiClusterJedislientConfig to encapsulate resilience4j configurations - Created new MultiClusterPooledConnectionProvider to encapsulate multi-cluster management and operational capabilities - Created new JedisValidationException - Added new constructor to UnifiedJedis - Added resilience4j to pom.xml
- Changed CircuitBreakerCommandExecutor to be more thread safe by passing cluster by reference instead of multiple lookups - Exposed MultiClusterPooledConnectionProvider.Cluster as public so it can be accessed and passed by reference within CircuitBreakerCommandExecutor - Made some javadocs updates for easier readability - Removed debug from happy path so it has parity with other executors. It would likely be too busy on the logs in a production system anyway
- Moved log responsibility into provider for consistency - Added logging for manual failback/failover with consistent wording to the automated failover - Provided a better log for when the prioritized list is exhausted
- Added more safety for orchestration within mutation-operations on the activeMultiClusterIndex to avoid edge cases. In practice this will never likely come up but better to be extra careful as to avoid a deadlock or inaccurate transitions
* OSS Cluster Broadcast - Approach 2 * modify * Added doc * Added configSet * Added example as Java class * Added exception message from code review * Added the link of examples package in README * Deleted doc * Addressed review
…ependent locale for Double (redis#3318) * Forcing the locale that has a 'dot' as number format to string format method * Adding a new version of 'noperm' error message related the 'keys'. * Changed locale to 'english' and added comments for that * Undo import format in DocumentTest.java --------- Co-authored-by: M Sazzadul Hoque <[email protected]>
* Edited gson dependency as optional and add jackson dependency only for tests purpose * Created exception for config error purpose * Classes and interfaces created to gain code decoupling from json convertion implementation * Class is no longer needed * Interfaces created as contract for all redis command json operations to set an implementation of a json convertion by polymorphism * Changed json engine implementation to an interface to decouple code and make it interchangeable * Implemented contract to define a json engine encoding/decoding * classes created for json conversion with different json engines for testing purposes and junit tests for them * Removed import that is no longer used * Removed the optional statement for gson lib to not break the change * Just removed unused exception * Edited to use a plain jedis exception instead of a custom one * setting gson as default json parser automatically when none set * Removed unnecessary interface but kept setters for json serializer/deserializer engine configuration * Unused imports removed * Classes, interfaces, methods and other comment references renamed from word 'parser' to 'object mapper'. * Classes and interfaces moved to 'json' package because it's not need a separate package * Made some tweaks to the custom object mapper for jackson which throws a jedi's Exception instead of just printing stack trace. * Refactored method to get json object mapper reference using double checked lock approach as suggestion in review code * Removed unit test no longer occurs jedis exception after refactoring json object mapper instance in 'command object class' * Unused imports removed
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20220924 to 20230227. - [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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](apache/maven-javadoc-plugin@maven-javadoc-plugin-3.4.1...maven-javadoc-plugin-3.5.0) --- 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Due to usages of `sprintf(str, "%.15g", d);` when d is NaN. From @LiorKogan: "We should treat `-nan` as `nan`". References: - RedisGraph/RedisGraph#2930
* Make sure MultiNodePipelineBase is safe under multi-thread * Edit log message --------- Co-authored-by: Stiller <[email protected]> Co-authored-by: M Sazzadul Hoque <[email protected]>
…edis#3331) * Obtain multiple pipelines concurrently. high performance improvement Signed-off-by: c00603587 <[email protected]> * execute countDown regardless of whether the above program is abnormal, otherwise the await cannot be released Signed-off-by: c00603587 <[email protected]> * Update src/main/java/redis/clients/jedis/MultiNodePipelineBase.java Co-authored-by: M Sazzadul Hoque <[email protected]> * set default sync workers to 3 Signed-off-by: c00603587 <[email protected]> * remove unused import package Signed-off-by: c00603587 <[email protected]> * modify the muti node pipeline sync workers --------- Signed-off-by: c00603587 <[email protected]> Co-authored-by: c00603587 <[email protected]> Co-authored-by: M Sazzadul Hoque <[email protected]>
Co-authored-by: M Sazzadul Hoque <[email protected]>
* Adding supported redis/library details * PR comments * Update README.md Co-authored-by: M Sazzadul Hoque <[email protected]> * Update README.md Co-authored-by: M Sazzadul Hoque <[email protected]> --------- Co-authored-by: M Sazzadul Hoque <[email protected]>
* Jedis avoid using QUIT command Please refer to: redis/redis#11420 This PR cancels calling the quit command when the Jedis internal link is abnormal, and deprecate the user interface `Jedis.quit()`. This optimizes Jedis connection pool performance and fixes: redis#2105 * Update src/main/java/redis/clients/jedis/Connection.java Co-authored-by: M Sazzadul Hoque <[email protected]> * Apply suggestions from code review Co-authored-by: M Sazzadul Hoque <[email protected]> --------- Co-authored-by: M Sazzadul Hoque <[email protected]>
…lable - Moved increment below a validation so subsequent calls to lookup the cluster connection do not throw a nullpointer exception - Replaced custom connection close logic with try-with-resources statements
* Fix test with issue hidden due to optional client name * Avoid keeping residue after test
…possible - Added logic to fallback method that handles subsequent calls after all failover attempts have been exhausted and only a manual failback can resume operations - Added new flag to indicate that all attempts to failover have been exhausted - Changed comments to clarify that an endpoint can belong to a cluster but also a database so it is more OSS friendly - Added logic to the manual failback method to allow an existing cluster to reattempt to connect to its current cluster/database in case its the only option that became available
* Support report libname and libver to Redis redis#3338 Co-authored-by: M Sazzadul Hoque <[email protected]> * Refactor ClientAttributeOption Co-authored-by: M Sazzadul Hoque <[email protected]> * Apply suggestions from code review * Keep select() * Update src/main/java/redis/clients/jedis/Connection.java Co-authored-by: M Sazzadul Hoque <[email protected]> --------- Co-authored-by: M Sazzadul Hoque <[email protected]>
- Users can now configure their custom logic to persist the activeMultiClusterIndex or custom logging after a successful cluster failover via a functional interface
Conflicts: pom.xml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.