-
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: apply PCR AOST time stamp for authentication flow #135929
base: master
Are you sure you want to change the base?
Conversation
Previously, when using PCR reader catalog its was possible to hit "PCR reader timestamp has moved forward" when attempting to execute workloads. This was because internal executors are exempt from the AOST timestamp. To address this, the authentication code paths are updated to set fixed timestamps, when connecting to a PCR reader catalog. Additionally, additional tests are added for validating opening new connections and preparing queries to confirm this problem is fixed. Fixes: cockroachdb#135829 Release note: None
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 the patch!! I'll try running my roachtest on top of this. I'll let someone from foundations approve this.
One other thought: I wonder if there's a more general way to find other internal executor read queries that require a fixed timestamp. Or maybe this points to a larger design problem: perhaps no system tables should be externalized. cc @dt
@@ -322,6 +328,16 @@ func TestReaderCatalogTSAdvance(t *testing.T) { | |||
} else { | |||
require.NotEqualValues(t, srcRes, destRes) | |||
} | |||
|
|||
// Sanity: Execute the same query as prepared statement inside the reader |
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.
to confirm, were these unit tests with prepared stmts failing before your patch to the source code?
@@ -432,7 +473,7 @@ func TestReaderCatalogTSAdvance(t *testing.T) { | |||
// with PCR even if a long running txn is running. | |||
func TestReaderCatalogTSAdvanceWithLongTxn(t *testing.T) { | |||
defer leaktest.AfterTest(t)() | |||
skip.UnderDuress(t) | |||
// skip.UnderDuress(t) |
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.
nit: intended?
Previously, when using PCR reader catalog its was possible to hit "PCR reader timestamp has moved forward" when attempting to execute workloads. This was because internal executors are exempt from the AOST timestamp. To address this, the authentication code paths are updated to set fixed timestamps, when connecting to a PCR reader catalog. Additionally, additional tests are added for validating opening new connections and preparing queries to confirm this problem is fixed.
Fixes: #135829
Release note: None