basho / riak-python-client

The Riak client for Python.
Apache License 2.0
321 stars 183 forks source link

Smart re-try for operations #504

Closed lukebakken closed 7 years ago

lukebakken commented 7 years ago

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)

christophermancini commented 7 years ago

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

lukebakken commented 7 years ago

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