Skip to content
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

statusccl: fix flaky TestTenantStatusAPI txn_id_resolution #100817

Merged
merged 1 commit into from
Apr 10, 2023
Merged

statusccl: fix flaky TestTenantStatusAPI txn_id_resolution #100817

merged 1 commit into from
Apr 10, 2023

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Apr 6, 2023

The txn resolution add a txn id to the cache, and
then in a separate call updates the txn id with the
fingerprint. The test previously assumed if there
was a record it would always have a valid fingerprint,
but that is not true. The test is modified to add retry
logic to wait for the fingerprint to be updated. The
retry time was set to always be 1 minute, because
SucceedsSoon only waits 5 seconds for race scenario
which is not enough time for the resolution to complete.

Epic: none
part of: #99770

Release note: none

Epic: CRDB-25476

@j82w j82w requested a review from a team April 6, 2023 14:45
@j82w j82w requested a review from a team as a code owner April 6, 2023 14:45
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @j82w)


pkg/ccl/serverccl/statusccl/tenant_status_test.go line 1231 at r1 (raw file):

			}
			return nil
		}, 1*time.Minute)

Is there a concern this wait time could increase too much the time of the test and it could cause issue under stress? Should this test be skipped under stress?

@j82w
Copy link
Contributor Author

j82w commented Apr 6, 2023

pkg/ccl/serverccl/statusccl/tenant_status_test.go line 1231 at r1 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

Is there a concern this wait time could increase too much the time of the test and it could cause issue under stress? Should this test be skipped under stress?

It's already skipped.

skip.UnderStressRace(t, "expensive tests")

@j82w
Copy link
Contributor Author

j82w commented Apr 6, 2023

pkg/ccl/serverccl/statusccl/tenant_status_test.go line 1231 at r1 (raw file):

Previously, j82w (Jake) wrote…

It's already skipped.

skip.UnderStressRace(t, "expensive tests")

The extended time is probably not necessary now that it actually retries on default fingerprint, but I made the change to be on the safe side.

The txn resolution add a txn id to the cache, and then
in a separate call updates the txn id with the fingerprint.
The test previously assumed if there was a record it would
always have a valid fingerprint, but that is not true. The
test is modified to add retry logic to wait for the fingerprint
to be updated. The retry time was set to always be 1 minute,
because SucceedsSoon only waits 5 seconds for race scenario
which is not enough time for the resolution to complete.

Epic: none
part of: #99770

Release note: none
Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @j82w)

@j82w
Copy link
Contributor Author

j82w commented Apr 6, 2023

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 6, 2023

Build failed:

@j82w
Copy link
Contributor Author

j82w commented Apr 10, 2023

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 10, 2023

Build succeeded:

@craig craig bot merged commit 12548c5 into cockroachdb:master Apr 10, 2023
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.

3 participants