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

Update Vindex only on changes #6737

Merged
merged 8 commits into from
Sep 24, 2020
Merged

Conversation

harshit-gangal
Copy link
Member

Same value vindex update are avoided by checking the old and the new value. Vitess does not perform string comparisons due to collation so for vindex involving varchar, etc. are updated even if they have same new and old values.
With this change, the string comparison is sent down to mysql through owned vindex lookup query, so there is no additional hop added and the comparison is handled by mysql.
If it returns true then the vindex is not updated.

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@harshit-gangal harshit-gangal marked this pull request as ready for review September 18, 2020 13:24
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@harshit-gangal harshit-gangal merged commit d4bd3ba into vitessio:master Sep 24, 2020
@harshit-gangal harshit-gangal deleted the upd-vindex branch September 24, 2020 15:28
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
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