-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
vreplication: Materialize stalls when unique field left out #11991
Labels
Comments
@derekperkins I think this would be fixed by: #13893 Here's a test case from that branch based on what you shared in this issue:
With the final output being:
So this would ensure that we do use the proper/best index here. Or do you think I'm missing or misunderstanding something here? Thanks! |
4 tasks
Thanks @mattlord! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was using
Materialize
to make a copy of a small table in another keyspace. I accidentally forgot to includeslug
, which is a unique index on both the source and target, butworkspace_id
is the PK, so I wouldn't expect any issues. When I ranvtctlclient Workflow iam.iam__workspaces__copy show
, it returned"State": "Error"
, but"Message": "Picked source tablet: cell:\"uscentral1\" uid:699290100"
instead of an error message. There were no error messages in tablet logs on either side, but there were logs showing that the stream had started on the source tablet.My not very informed hunch is that the
Materialize
unique/PK picker chose the unique slug column because it saw that before the PK workspace_id in the source table, but slug wasn't being copied to the target table, causing the copy to stall indefinitely without erroring. When I addedslug
back to the select query, it ran perfectly.This same behavior exhibited on both v15.0.0 and v15.0.2
source table
target table
stalled Materialize (
slug
EXCLUDED)working Materialize (
slug
INCLUDED)vtctlclient Workflow iam.iam__workspaces__copy show
notice
State: Error
, but the Message is that a tablet was selectedhttps://vitess.slack.com/archives/CMKTCUYNQ/p1671481794563869
cc @mattlord
The text was updated successfully, but these errors were encountered: