Skip to content

Update Vindex only on changes#6737

Merged
harshit-gangal merged 8 commits intovitessio:masterfrom
planetscale:upd-vindex
Sep 24, 2020
Merged

Update Vindex only on changes#6737
harshit-gangal merged 8 commits intovitessio:masterfrom
planetscale:upd-vindex

Conversation

@harshit-gangal
Copy link
Copy Markdown
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