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-20.1: gcjob: fix zone config gossip update filtering #47490

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

thoszhang
Copy link
Contributor

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.

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.

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.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@thoszhang thoszhang mentioned this pull request Apr 14, 2020
83 tasks
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner)

@thoszhang thoszhang merged commit 11e94d1 into cockroachdb:release-20.1 Apr 14, 2020
@thoszhang thoszhang deleted the backport20.1-47313 branch April 14, 2020 21:53
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.

None yet

5 participants