More robust retry logic around failed riak connections
More robust retry logic around failed riak connections

Previously, it was possible to enter into a connection request with only
one connection available, with max_retries of say, 5. If this single
connection died, we ended up raising without flailing and attemping the
old connections.

This causes us to prematurely fail requests when it's possible that
other connections have since revived.

We change this to always do max_retries attempts, even when connections
are dead, so that we can hope to reconnect in case of ECONNRESET.

zenefits/sentry,fotinakis/sentry,JackDanger/sentry,BuildingLink/sentry,ifduyue/sentry,jean/sentry,ifduyue/sentry,mvaled/sentry,fotinakis/sentry,zenefits/sentry,JamesMura/sentry,JackDanger/sentry,ifduyue/sentry,JamesMura/sentry,mitsuhiko/sentry,ifduyue/sentry,fotinakis/sentry,gencer/sentry,looker/sentry,JamesMura/sentry,JamesMura/sentry,gencer/sentry,mvaled/sentry,looker/sentry,alexm92/sentry,beeftornado/sentry,BuildingLink/sentry,BuildingLink/sentry,mvaled/sentry,BuildingLink/sentry,ifduyue/sentry,looker/sentry,JackDanger/sentry,daevaorn/sentry,zenefits/sentry,zenefits/sentry,daevaorn/sentry,daevaorn/sentry,beeftornado/sentry,beeftornado/sentry,JamesMura/sentry,fotinakis/sentry,nicholasserra/sentry,BuildingLink/sentry,jean/sentry,alexm92/sentry,zenefits/sentry,mvaled/sentry,mvaled/sentry,alexm92/sentry,gencer/sentry,mvaled/sentry,nicholasserra/sentry,jean/sentry,mitsuhiko/sentry,nicholasserra/sentry,gencer/sentry,jean/sentry,looker/sentry,looker/sentry,daevaorn/sentry,jean/sentry,gencer/sentry