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

VReplication errors when fixed-length binary column is used as sharding key #8080

Closed
deepthi opened this issue May 7, 2021 · 2 comments
Closed

Comments

@deepthi
Copy link
Member

deepthi commented May 7, 2021

Overview of the Issue

For fixed length binary columns, mysql internally pads the values on the right will nulls. However the binlogs contain the original value. This leads to a problem in vreplication workflows if a binary column is used as a sharding key.

During the copy phase the row is read using a mysql select and the column has the padded value. However while replicating we get the unpadded value. This means that we get different keyspace_ids. We found bugs where the copy phase inserted the row in one shard but the update during the catchup phase routed this row to another shard where, of course, the update failed.

@deepthi
Copy link
Member Author

deepthi commented May 7, 2021

A fix has already been made in #7969. However that PR references a catch-all issue #3984. Creating an issue for this specific bug for reporting purposes.

@deepthi
Copy link
Member Author

deepthi commented May 7, 2021

Tasks

EDIT 5/12/2021: @aquarapid has reported that the resharding diffs they were seeing are now resolved.

@deepthi deepthi changed the title VReplication errors when binary column is used as sharding key VReplication errors when fixed-length binary column is used as sharding key May 7, 2021
deepthi added a commit to planetscale/vitess that referenced this issue May 7, 2021
Signed-off-by: deepthi <deepthi@planetscale.com>
deepthi added a commit to planetscale/vitess that referenced this issue May 7, 2021
Signed-off-by: deepthi <deepthi@planetscale.com>
deepthi added a commit to planetscale/vitess that referenced this issue May 7, 2021
Signed-off-by: deepthi <deepthi@planetscale.com>
deepthi added a commit that referenced this issue May 12, 2021
8.0.0: update release notes with known issue #8080
deepthi added a commit that referenced this issue May 12, 2021
9.0.0: update release notes with known issue #8080
deepthi added a commit that referenced this issue May 12, 2021
10.0.0: update release notes with known issue #8080
deepthi added a commit to planetscale/vitess that referenced this issue May 12, 2021
Signed-off-by: deepthi <deepthi@planetscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants