Skip to content

delete row using consistent lookup vindex in where clause#6700

Merged
harshit-gangal merged 6 commits intovitessio:masterfrom
planetscale:consistent_lkp_del
Sep 14, 2020
Merged

delete row using consistent lookup vindex in where clause#6700
harshit-gangal merged 6 commits intovitessio:masterfrom
planetscale:consistent_lkp_del

Conversation

@harshit-gangal
Copy link
Copy Markdown
Member

With the recent change to consistent lookup to lock lookup row on vindex map for DML queries in transaction.
It created a regression for delete using vindex lookup as the row locking happens using pre shard session and delete of vindex happens through post shard session.

This PR sees the intent of the Vindex Map and if it is Delete query then it uses post shard session for vindex row lock.

Fixes: #6698

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@harshit-gangal harshit-gangal changed the title Consistent lkp del delete row using consistent lookup vindex in where clause Sep 11, 2020
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 11, 2020 15:07
Signed-off-by: Andres Taylor <andres@planetscale.com>
@harshit-gangal harshit-gangal merged commit c893acd into vitessio:master Sep 14, 2020
@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.

Lock wait timeout on DELETE from table using lookup index

3 participants