Skip to content
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

Renew slot cache if ClusterPipeline.sync results in MOVED response #3816

Conversation

killergerbah
Copy link

@killergerbah killergerbah commented Apr 11, 2024

The intent of this change is to fix a couple issues MultiNodePipelineBase:

  • Exceptions thrown from Connection.getMany are swallowed.
  • JedisMovedDataException does not trigger a call to JedisClusterInfoCache.renewClusterSlots (and there may be no other opportunity to call JedisClusterInfoCache.renewClusterSlots if the application did not specify a topologyRefreshPeriod when constructing JedisCluster).

With this implementation only the first exception thrown from Connection.getMany is rethrown; however this matches the behavior of Pipeline.

@sazzad16
Copy link
Collaborator

Reacting to MOVED response is reasonable request.

BUT the priority is put more towards ensuring execution of pipeline in as many connections as possible.
The finally { executorService.shutdownNow(); } goes against that.

Moreover, there are many cases to consider and I have concerns about those. One simple to understand of those is syncing = false; should be within finally. Because I have concerns overall with the approach, I am not putting it as code review.

@killergerbah
Copy link
Author

Got it - I suspect there is anyway a more complete fix for redirect responses from pipelines used on clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants