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

zone: fix error caused subzone placeholders not inheriting from parents #44266

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

rohany
Copy link
Contributor

@rohany rohany commented Jan 23, 2020

Fixes #44231.
Fixes #41553.

This PR fixes a bug caused by backports.

In short, the backport of #41506 to 19.1 did not include some code
in #40493 which allowed a subzone placeholder to inherit fields
from its parents. This caused a problem the second time a index's
zone was altered, because its parent (now a subzone placeholder)
would no longer be able to inherit values from its parent.
We couldn't backport #40493 because it contained features that
were only released in 19.2, and since there was not a test checking
this specific behavior, we didn't catch the regression on 19.1.
Therefore, this PR contains a partial backport of #40493.

Release note (bug fix): Fix a bug where repeated use of COPY FROM PARENT
on an index or partition could cause an unexpected validation error.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rohany
Copy link
Contributor Author

rohany commented Jan 23, 2020

Thanks nathan for the repro! I was kind of staring at this error coming up on the tpcc failures and unsure how to debug it any further...

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

:lgtm: thanks for the quick fix @rohany!

It's worth pointing out in the commit message that while this isn't a full backport of #40493, it is a partial backport of that change. That makes this easier to justify as a backport target.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

Fixes cockroachdb#44231.
Fixes cockroachdb#41553.

This PR fixes a bug caused by backports.

In short, the backport of cockroachdb#41506 to 19.1 did not include some code
in cockroachdb#40493 which allowed a subzone placeholder to inherit fields
from its parents. This caused a problem the second time a index's
zone was altered, because its parent (now a subzone placeholder)
would no longer be able to inherit values from its parent.
We couldn't backport cockroachdb#40493 because it contained features that
were only released in 19.2, and since there was not a test checking
this specific behavior, we didn't catch the regression on 19.1.
Therefore, this PR contains a partial backport of cockroachdb#40493.

Release note (bug fix): Fix a bug where repeated use of COPY FROM PARENT
on an index or partition could cause an unexpected validation error.
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