Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.1: jobs,sql/importer: retry circuit breaker open errors #90432

Merged

Conversation

stevendanna
Copy link
Collaborator

@stevendanna stevendanna commented Oct 21, 2022

Backport 1/1 commits from #89354.

/cc @cockroachdb/release


We would like to retry circuit breaker open errors. In fact, jobs.IsPermanentBulkJobError already looks like it would return false for breaker open errors.

But, there are actually two circuit breaker packages we use:

github.com/cockroachdb/circuitbreaker
github.com/cockroachdb/cockroach/pkg/util/circuit

Both define ErrBreakerOpen. IsPermanentBulkJobError would only catch errors from one of these packages. Now, we test for both.

As a result, ErrBreakerOpen errors emerging from the nodedialer will now be retried.

Fixes #89159
Fixes #85111
Fixes #81353
Fixes #91332

I may be being a bit optimistic that this will fully fixe those failures. Success of the job still requires that the retry of the job is successful.

Release note (bug fix): Fix bug that resulted in some retriable errors not being retried during IMPORT.

Release justification: Low-risk bug fix.

@stevendanna stevendanna requested review from a team as code owners October 21, 2022 10:16
@stevendanna stevendanna requested review from ajwerner and adityamaru and removed request for a team October 21, 2022 10:16
@blathers-crl
Copy link

blathers-crl bot commented Oct 21, 2022

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Member

This change is Reviewable

We would like to retry circuit breaker open errors. In fact,
jobs.IsPermanentBulkJobError already looks like it would return false
for breaker open errors.

But, there are actually two circuit breaker packages we use:

    github.com/cockroachdb/circuitbreaker
    github.com/cockroachdb/cockroach/pkg/util/circuit

Both define ErrBreakerOpen. IsPermanentBulkJobError would only catch
errors from one of these packages. Now, we test for both.

As a result, ErrBreakerOpen errors emerging from the nodedialer will
now be retried.

Fixes cockroachdb#89159
Fixes cockroachdb#85111
Fixes cockroachdb#81353

I may be being a bit optimistic that this will fully fixe those
failures. Success of the job still requires that the retry of the job
is successful.

Release note (bug fix): Fix bug that resulted in some retriable errors
not being retried during IMPORT.
@stevendanna stevendanna merged commit 686acdc into cockroachdb:release-22.1 Nov 10, 2022
@stevendanna stevendanna deleted the backport22.1-89354 branch November 10, 2022 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants