-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: asynchronous [CREATE|DROP] INDEX #2036
Comments
I think we're going to need parts of this sooner than I expected. We currently can't use the gossiped table descriptors safely in almost any circumstance and not using the gossiped descriptors is a significant performance hit (at least 1 and perhaps 2 extra reads). We can't use the gossiped descriptors in The challenge is to know when a change to a descriptor has been propagated to all of the nodes using that descriptor. F1 solves this by using leases on the order of minutes and making sure a write operation never commits after the version of the table descriptor it is using is more than 1 version old. It would be unfortunate for tests if a |
I think we'll be able to find a solution to keep tests running smoothly no matter how we go about it (at least that shouldn't concern us as much). Having leases on the schema seems like it was going to happen eventually anyways (or are there any viable alternatives?) - in that case, we could put something together that skips the lease timeout (i.e. when a schema change is issued and commits, we advance the clock or manually invalidate the cache, the latter likely being preferable). |
Yeah, we can always fix the test issue by advancing time, but I think we'll need to fix this for a real system too. It would be highly unexpected for someone to start a test cluster, create a table and then try to create an index and have that |
I have some half-baked ideas too. Will wait for your RFC. |
The remaining work here is tracked by #2845. |
See #2035. Adding an index will be a multi-step process:
Note that the backfilling of a unique index might detect a duplicate key violation requiring the whole process to be rolled back.
Dropping an index will involve:
TableDescriptor
.TableDescriptor
change to propagate to all of the nodes.DelRange
operation.TableDescriptor
.The text was updated successfully, but these errors were encountered: