Skip to content

Don't retry errors when there are no replicas

Yorick Peterse requested to merge yorick/reduce-lb-overhead into master

What does this MR do and why?

In CI we don't have any replicas set up. In this case retrying any connection errors (e.g. when a job runs without a DB set up) can increase the job timings.

To fix this, we simply don't retry connection errors in case no replicas are used. This also ensures the retry behaviour is the same as before the introduction of always enabling the load balancing code.

Finally, we no longer treat NoDatabaseError errors as connection errors. There's no point in retrying these errors, even if replicas are present, as retrying isn't magically going to make your database exist.

See #341757 (closed) for more information.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Yorick Peterse

Merge request reports

Loading