• Yorick Peterse's avatar
    Don't retry errors when there are no replicas · 0f27854a
    Yorick Peterse authored
    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 https://gitlab.com/gitlab-org/gitlab/-/issues/341757 for more
    information.
    
    Changelog: fixed
    0f27854a
load_balancer_spec.rb 12.5 KB