-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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/hydratedtables: add a cache for hydrated table descriptors and adopt #53323
sql/catalog/hydratedtables: add a cache for hydrated table descriptors and adopt #53323
Conversation
0481dab
to
79edd01
Compare
bc63cd6
to
f2fea7c
Compare
f2fea7c
to
6f2da78
Compare
Good new is I benchmarked this and found:
Still working though the logictest changes |
nice, glad to see this measurable impact |
75fc91f
to
cdc0963
Compare
Okay @rohany I did less drastic things than at one point we discussed. I think this now works PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to take another pass at this tonight, but left some preliminary comments
// This case should not meaningfully arise in practice. | ||
td := tableDescUDT.ImmutableCopy().(*tabledesc.Immutable) | ||
{ | ||
hydrated, canUse, err := c.GetHydratedTableDescriptor(ctx, td, resWithMut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can we use cache in this case and below? Isn't the type modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use does not mean that we definitely stored it in the cache, just that we hydrated it underneath the call.
…table Release note: None
Adds an IsHydrated method to types and then uses it to determine whether a type should be hydrated. Release note: None
This is handy when trying to determine whether we can cache a descriptor. Release justification: Part of a change to eliminate a major performance degradation for a new feature. Release note: None
cdc0963
to
d41f79f
Compare
This cache ends up being important for dealing with user-defined types. Release note: None Release justification:
Release note: None
When we hydrate a table descriptor which has been modified during the transaction we want to ensure that we propagate the information that indicates that it has been modified. Release justification: Part of a larger fix to a major performance enhancement for user-defined types, a new feature in this release. Release note: None
d41f79f
to
2b6e7c9
Compare
TFTR! bors r=rohany |
Build failed (retrying...): |
Build succeeded: |
See individual commits.
Fixes #51385.
Release note: None