Skip to content

Conversation

@lukebakken
Copy link
Contributor

@lukebakken lukebakken commented Nov 22, 2016

If an operation immediately receives an error indicating a closed socket (common with Amazon ELB), re-try it at least once no matter the global retry settings. This will also be done for streaming operations that are normally not retried at all, since it is safe to re-try in this specific case.

Fixes #503 (CLIENTS-1049)

@lukebakken lukebakken added this to the riak-python-client-2.6.2 milestone Nov 22, 2016
@lukebakken lukebakken changed the title WIP: Smart re-try for operations Smart re-try for operations Nov 23, 2016
@christophermancini
Copy link

Code looks good and tests pass. Do we have tests that confirm connections are closed?

@lukebakken
Copy link
Contributor Author

Do we have tests that confirm connections are closed?

Not sure why we would need that? For this change the only way to test it is to use haproxy with really short timeouts https://gist.github.com/lukebakken/81c0609c274b083272f182443a6267f5

@lukebakken lukebakken merged commit 93253ef into master Nov 28, 2016
@lukebakken lukebakken deleted the features/lrb/retry-on-closed-gh-503 branch November 28, 2016 23:50
@lukebakken lukebakken modified the milestones: riak-python-client-2.6.2, riak-python-client-2.7.0 Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-try initial operation if socket is closed [JIRA: CLIENTS-1049]

3 participants