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

Potentially "overlocking" in cursor? #341

Open
SpencerMalone opened this issue Mar 9, 2023 · 0 comments
Open

Potentially "overlocking" in cursor? #341

SpencerMalone opened this issue Mar 9, 2023 · 0 comments

Comments

@SpencerMalone
Copy link

We get a lot of issues caused by...
Error 1213 (40001): Deadlock found when trying to get lock; try restarting transaction when mass migrating data, and I was trying to understand why the select locks are so aggressive.

I'm guessing that the locking in...
https://github.com/Shopify/ghostferry/blob/master/cursor.go#L174-L176
is an implementation of around https://github.com/Shopify/ghostferry/blob/master/tlaplus/ghostferry.tla#L332-L354 in the design spec, and I was wondering if there was any reason we couldn't use a FOR SHARE / LOCK IN SHARE MODE in the cursor to reduce the write lock churn when migrating lots of pieces of data at once? This issue is half bug / half feature request / half question, but the IRC seemed pretty empty when I poked at it, so I figured I'd broach the subject here.

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

No branches or pull requests

1 participant