-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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-19.1: sql: at least one replica is required when using num_replicas = COPY FROM PARENT #44231
Comments
It's pretty strange that this doesn't show up in v19.2.0 and above because the PR that was backported onto 19.1 (#41506) was also backported onto 19.2. Maybe there's something different about how this is done in the 19.1 branch. I can investigate this further. |
Alright, this is reproduceable in a sql shell with:
|
Whats weird is that after the second alter index, the index has a zone configuration with num_replicas = 0, but this isn't caught by the validator. |
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 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.
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.
There appears to have been a regression in v19.1.6 where subzones do not interact properly in all cases with COPY FROM PARENT, which can result in an unexpected error.
Reproduction Steps
This is not present in v19.1.5 or below. It is also not present in v19.2.0 or above.
I tracked this down to only occurring with subzones because the same issue does not occur when you run:
So based on the timing and the behavior, I think it's likely that this was a result of #41699.
@rohany can I get you to take this over? I suspect you'll have additional insight into what's going wrong here. You might also know just by looking at it why this was caused by #41699. Did that change simply reveal a different bug?
The text was updated successfully, but these errors were encountered: