-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
RFC: Locking functions #6367
Labels
Milestone
Comments
I think these are reasonable restrictions. |
Closed
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Locking Functions
Supporting the advisory locking functions in MySQL is important, given that they are used by common applications and frameworks.
Functions covered
Restrictions
Vitess will initially only support locking functions with these limitations:
dual
, or have noFROM
clause.Functionality
Locking function evaluation will have a simple and consistent routing scheme, making sure all requests happen at the same target. This way, locks will be executed on the same
mysqld
.The locking function evaluation always be routed to the first shard in the first keyspace known to the VTGate, sorted alphabetically.
Using any of the locking functions will force the session to use a reserved connection - a dedicated connection to
mysqld
for that session, so thatget_lock()
/release_lock()
happen on the same connection, and so thatCOM_QUIT
releases any lingering locks.Examples of valid queries
Examples of queries not supported in the first implementation
The text was updated successfully, but these errors were encountered: