Skip to content

Conversation

@fqazi
Copy link
Collaborator

@fqazi fqazi commented Nov 23, 2023

Previously, TestTableCreationPushesTxnsInRecentPast could flake because we attempted to increase odds of hitting the uncertainty interval error by adding a delay on KV RPC calls. This wasn't effective and could still intermittent failures, and instead we are going to directly modify the uncertainty interval by setting a large MaxOffset on the clock. This will cause the desired behaviour in a more deterministic way.

Fixes: #114366

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@fqazi fqazi force-pushed the TestTableCreationPushesTxnsInRecentPastFlake branch from 28a1765 to 3de9757 Compare November 23, 2023 21:47
@fqazi fqazi marked this pull request as ready for review November 24, 2023 00:13
@fqazi fqazi requested a review from a team as a code owner November 24, 2023 00:14
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @fqazi)


-- commits line 9 at r1:
just for my own education: could you say more about why this causes the desired behavior?

Previously, TestTableCreationPushesTxnsInRecentPast could flake because
we attempted to increase the uncertainty interval error by adding a
delay on KV RPC calls to make the uncertainty interval larger. This
would work based on the observed timestamp having a variance between
nodes. This wasn't effective, and we could still have intermittent
failures, because the variance was not large enough. To address this,
this patch will increase the maximum offset on the HLC clock itself,
which is used as the base value for computing the uncertainty interval
(see computeIntervalForTxn). With this change, we expect a more
deterministic reproduction of the txn getting pushed because of the
uncertainty interval.

Fixes: cockroachdb#114366

Release note: None
@fqazi fqazi force-pushed the TestTableCreationPushesTxnsInRecentPastFlake branch from 3de9757 to 1fb0eac Compare November 24, 2023 19:59
Copy link
Collaborator Author

@fqazi fqazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)


-- commits line 9 at r1:

Previously, rafiss (Rafi Shamim) wrote…

just for my own education: could you say more about why this causes the desired behavior?

I updated the commit message for why it should work

@fqazi fqazi requested a review from rafiss November 24, 2023 19:59
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice thanks for the explanation!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@fqazi
Copy link
Collaborator Author

fqazi commented Nov 27, 2023

@rafiss TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 27, 2023

Build succeeded:

@craig craig bot merged commit b464c1c into cockroachdb:master Nov 27, 2023
@rafiss
Copy link
Collaborator

rafiss commented Dec 15, 2023

blathers backport 23.2

@rafiss
Copy link
Collaborator

rafiss commented Dec 15, 2023

blathers backport 23.2.0-rc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql/catalog/lease: TestTableCreationPushesTxnsInRecentPast failed

3 participants