release-22.1: sql/gcjob: deal with a missing system config span #83474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #83280.
/cc @cockroachdb/release
This can cause panics if not handled. It must be quite rare that the jobs
subsystem gets going before we have a system config, but clearly it's
possible.
The contract on the SystemConfigProvider is that it can return nil. This case has to be
handled.
cockroach/pkg/config/provider.go
Lines 16 to 17 in 8878715
See https://teamcityartifacts.crdb.io/presignedTokenAuth/158ce0ab-b5b6-4cc1-9f1b-672d20d0a56e/repository/download/Cockroach_Ci_Tests_LocalRoachtest/5545173:id/acceptance/version-upgrade/run_1/artifacts.zip!/logs/2.unredacted/cockroach-stderr.05b0f904debc.roach.2022-06-23T14_53_26Z.103197.log
Release note (bug fix): Fixed a bug where a panic could occur during server
startup when restarting a node which is running a GC job.
Release justification: Fixes a bug which can cause a node to crash during startup.