-
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/catalog: provide batched access to descriptors #64388
Comments
Complement to the definition of done:
|
@ajwerner and I went over this some more yesterday and came to the conclusion that it was better NOT to implement the
Consequently we need to redefine the work tracked in this ticket. I'll do this shortly. It'll probably involve adding another public function to |
Previously the descs.Collection's descriptor retrievals were done one at a time, outside of some special cases. This commit replaces the getDescriptorByID method at the heart of these lookups with a batched equivalent, getDescriptorsByID. Existing functionality remains unchanged. Fixes cockroachdb#64388. Release note: None
Previously the descs.Collection's descriptor retrievals were done one at a time, outside of some special cases. This commit replaces the getDescriptorByID method at the heart of these lookups with a batched equivalent, getDescriptorsByID. Existing functionality remains unchanged. Fixes cockroachdb#64388. Release note: None
Is your feature request related to a problem? Please describe.
Today we do not have any APIs to retrieve a set of descriptors in parallel. There are some good reasons for that. We don't currently permit any concurrency in the
*kv.Txn
library (#60968). For cases where we may lease descriptors or where we may be looking things up by name, there's likely too much complexity to tell any sort of reasonable story. Fortunately, that's a motivating use case here. There are cases where we know a bunch of IDs which we'd like to look up ahead of time (GRANT, REVOKE, DROP) and we know in these cases we don't care about caching.Describe the solution you'd like
Add a method to the
descs.Collection
to fetch a bunch of descriptors in a single batch. Almost certainly this means implementingcatalog.BatchDescGetter
on the*descs.Collection
. The challenge will be to optimize the hydration and validation. It should all be workable.Additional context
This is one of two remaining work items to fix the linear runtime of GRANT *, REVOKE * (#41930).
Epic: CRDB-8577
The text was updated successfully, but these errors were encountered: