-
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: let AS OF SYSTEM TIME requests use table descriptor cache #31716
Conversation
FYI @nvanbenschoten |
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.
Thanks for getting this out so fast! I'm a little concerned about the general lack of testing around here, but perhaps I'm just missing it.
This code is tested through TestAsOfTime and TestTxnCanStillResolveOldName, so the approach is correct. The only problem with this change is that it's not testing that the cache is indeed being used. Let me add a test just for that. |
Added TestAsOfSystemTimeUsingCache |
bors r+ |
Build failed |
This change also fixes a problem where TRUNCATE was not setting the ModificationTime on the descriptor. This change also fixes a bug where we were not using Timestamp.Prev() to compute the previous timestamp when reading the previous version of a descriptor. This change disables the use of the descriptor cache when AS OF SYSTEM TIME is for a timestamp before a DROP or a TRUNCATE on a table because of a bug in AcquireByName(). fixes cockroachdb#30967 Release note (sql change): Speedup AS OF SYSTEM TIME requests by letting them use the table descriptor cache.
bors r+ |
31644: storage: remove excessive new range lease logging r=spencerkimball a=spencerkimball Release note: None 31716: sql: let AS OF SYSTEM TIME requests use table descriptor cache r=vivekmenezes a=vivekmenezes This change also fixes a problem where TRUNCATE was not setting the ModificationTime on the descriptor. This change also fixes a bug where we were not using Timestamp.Prev() to compute the previous timestamp when reading the previous version of a descriptor. This change disables the use of the descriptor cache when AS OF SYSTEM TIME is for a timestamp before a DROP or a TRUNCATE on a table because of a bug in AcquireByName(). fixes #30967 Release note (sql change): Speedup AS OF SYSTEM TIME requests by letting them use the table descriptor cache. Co-authored-by: Spencer Kimball <[email protected]> Co-authored-by: Vivek Menezes <[email protected]>
Build succeeded |
This change removes the fixedTimestamp bit introduced in cockroachdb#31716 It also explains problem cockroachdb#18354 with LeaseManager.Acquire() through a comment and implements a work around bypassing the cache and reading the descriptor directly from the store. It also fixes a problem with UncachedPhysicalAccessor.GetObjectDesc tested through TestTxnCanStillResolveOldName. related to cockroachdb#30967 fixes cockroachdb#18354 fixes cockroachdb#19925 Release note: None
This change removes the fixedTimestamp bit introduced in cockroachdb#31716 It also explains problem cockroachdb#18354 with LeaseManager.Acquire() through a comment and implements a work around bypassing the cache and reading the descriptor directly from the store. It also fixes a problem with UncachedPhysicalAccessor.GetObjectDesc tested through TestTxnCanStillResolveOldName. related to cockroachdb#30967 fixes cockroachdb#18354 fixes cockroachdb#19925 Release note: None
This change removes the fixedTimestamp bit introduced in cockroachdb#31716 It also explains problem cockroachdb#18354 with LeaseManager.Acquire() through a comment and implements a work around bypassing the cache and reading the descriptor directly from the store. It also fixes a problem with UncachedPhysicalAccessor.GetObjectDesc tested through TestTxnCanStillResolveOldName. related to cockroachdb#30967 fixes cockroachdb#18354 fixes cockroachdb#19925 Release note: None
31776: sql: cleanup AS OF SYSTEM TIME query descriptor cache lookup r=vivekmenezes a=vivekmenezes This change removes the fixedTimestamp bit introduced in #31716 It also explains problem #18354 with LeaseManager.Acquire() through a comment and implements a work around bypassing the cache and reading the descriptor directly from the store. It also fixes a problem with UncachedPhysicalAccessor.GetObjectDesc tested through TestTxnCanStillResolveOldName. related to #30967 fixes #18354 fixes #19925 Release note: None Co-authored-by: Vivek Menezes <[email protected]>
This change also fixes a problem where TRUNCATE was not
setting the ModificationTime on the descriptor.
This change also fixes a bug where we were not using
Timestamp.Prev() to compute the previous timestamp
when reading the previous version of a descriptor.
This change disables the use of the descriptor cache
when AS OF SYSTEM TIME is for a timestamp before
a DROP or a TRUNCATE on a table because of a bug
in AcquireByName().
fixes #30967
Release note (sql change): Speedup AS OF SYSTEM TIME requests by
letting them use the table descriptor cache.