Skip to content

Pipeline with failover to multi cluster#3594

Closed
sazzad16 wants to merge 3 commits into
redis:masterfrom
sazzad16:pipe-pipe
Closed

Pipeline with failover to multi cluster#3594
sazzad16 wants to merge 3 commits into
redis:masterfrom
sazzad16:pipe-pipe

Conversation

@sazzad16

Copy link
Copy Markdown
Contributor

Resolves #3568

@codecov-commenter

codecov-commenter commented Oct 23, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (452ea52) 71.60% compared to head (ece7132) 71.30%.

❗ Current head ece7132 differs from pull request most recent head 62bce79. Consider uploading reports for the commit 62bce79 to get more accurate results

Files Patch % Lines
...is/clients/jedis/MultiClusterFailoverPipeline.java 0.00% 37 Missing ⚠️
...tive/CircuitBreakerFailoverConnectionProvider.java 0.00% 14 Missing ⚠️
...jedis/activeactive/CircuitBreakerFailoverBase.java 80.00% 2 Missing and 1 partial ⚠️
...rc/main/java/redis/clients/jedis/UnifiedJedis.java 33.33% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3594      +/-   ##
============================================
- Coverage     71.60%   71.30%   -0.31%     
+ Complexity     4883     4872      -11     
============================================
  Files           290      291       +1     
  Lines         15610    15582      -28     
  Branches       1115     1113       -2     
============================================
- Hits          11178    11111      -67     
- Misses         3946     3988      +42     
+ Partials        486      483       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return new Pipeline(provider.getConnection(), true);
}

public Transaction multi() {

@banker banker Oct 26, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sazzad16 See my comment in #3568 (comment).

This is also a problem for multi(), subscribe(), and any methods that use JedisCommandIterationBase. Shouldn't we fix these as well?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current plan: Those will be in a different issue, and estimated there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3602 contains multi and supersedes this subscribe

@banker

banker commented Oct 26, 2023

Copy link
Copy Markdown
Member

We need to ensure that we've tested these changes. Would you like assistance with that @sazzad16 ?

@sazzad16

Copy link
Copy Markdown
Contributor Author

We need to ensure that we've tested these changes.

@banker I haven't found tests from our original failover implementation to imitate here for pipeline implementation. The only closest thing I can see is

try (UnifiedJedis jedis = new UnifiedJedis(localProvider)) {
// This should fail after 3 retries and meet the requirements to open the circuit on the next iteration
try {
jedis.get("foo");
} catch (Exception e) {}
// This should fail after 3 retries and open the circuit which will trigger the post processor
try {
jedis.get("foo");
} catch (Exception e) {}
}

@chayim chayim added the breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. label Nov 14, 2023
@sazzad16 sazzad16 added this to the 5.1.0 milestone Nov 15, 2023
@sazzad16 sazzad16 deleted the pipe-pipe branch November 15, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breakingchange Pull request that has breaking changes. Must include the breaking behavior in release notes. experimental

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for automatic failover in Pipeline

4 participants