release-20.1: gcjob: fix zone config gossip update filtering #47490
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 #47313.
/cc @cockroachdb/release
Previously, in the GC job, we were unintentionally refreshing all the
table descriptors on every system config gossip update. This involved a
round-trip to fetch the table descriptor from KV for every table. This
PR fixes this by using a filter for just the zone configs (which was
already implemented; we just weren't using it correctly), so that we
only refresh the tables on a zone config update.
This PR is intended to be a minimal change to bring about the intended
behavior, and I haven't tried to be more sophisticated in, e.g.,
refreshing the tables only on a zone config update that actually affects
the tables to be dropped.
Closes #47312.
Release note (bug fix): Fixed a bug in the new schema change GC job
implementation causing unnecessary table descriptor lookups whenever any
table was updated.