-
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
Bug Report: Update VSchema not send version if there are multiple vtgates operating at the same time. #15794
Comments
The vschema has a timestamp in it. But more importantly it's versioned in the topology server (e.g. etcd). I'm going to close this for now as it's not clear to me what bug is being called out. If I'm missing something please let us know and we can re-open this any time. Thanks! |
The UpdateVSchema method does not pass the version number and will be overwritten directly. This will cause it to be unsafe when multiple vtgate processes execute UpdateVSchema at the same time. Please take a look at the version of ts.globalCell.Update that passes nil, thank you. |
Thanks! I think you are correct here and we’re not providing serializability (although we could via etcd key versions and revisions) so you could read an old version, update it, and save the updated old structure overwriting intermediate changes. Because there’s no synchronization or concurrency controls concurrent writes from multiple vtgates will have a non-deterministic result and we could lose updates. I’ll reopen and let the query serving team comment. |
We should be able to enforce serializable changes across vtgates by leveraging the topo key version. For an example of where we're doing this today, look at the topo Lines 165 to 222 in f27d287
Writing the |
Overview of the Issue
hi,There is no version number passed here. There may be concurrency issues when updating VSchema if there are multiple vtgates operating at the same time.
Reproduction Steps
N/A
Binary Version
Operating System and Environment details
Log Fragments
The text was updated successfully, but these errors were encountered: