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

roachtest: better failure message for c2c roachtests #108484

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

lidorcarmel
Copy link
Contributor

In some failures cases the c2c roachtests may try to cutover even though the replication did not start successfully. This patch makes sure we fail with a more clear error in those cases.

Epic: none
Fixes: #107935

Release note: None

In some failures cases the c2c roachtests may try to cutover even though the
replication did not start successfully. This patch makes sure we fail with
a more clear error in those cases.

Epic: none
Fixes: cockroachdb#107935

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@msbutler
Copy link
Collaborator

msbutler commented Aug 9, 2023

theres a bug in the roachtest. could this PR instead just return the error properly?

@lidorcarmel
Copy link
Contributor Author

theres a bug in the roachtest. could this PR instead just return the error properly?

I agree that it's good to fail that monitor but how will that help here? we'll still be in main(), right?

also, probably the right solution here is to implement this todo:

// TODO(tschottdorf): actually let this fail the test instead of logging complaints.

@lidorcarmel lidorcarmel marked this pull request as ready for review August 9, 2023 22:32
@lidorcarmel lidorcarmel requested a review from a team as a code owner August 9, 2023 22:32
@lidorcarmel lidorcarmel requested review from rachitgsrivastava and DarrylWong and removed request for a team August 9, 2023 22:32
@msbutler
Copy link
Collaborator

Lol nice find with that todo.

My cursory read of the code is that if monitor.Go() returns with an error, the whole monitor will shut down.

And to be clear, i think adding a require around retainedTime<cutoverTIme seems fine to me.

@lidorcarmel
Copy link
Contributor Author

My cursory read of the code is that if monitor.Go() returns with an error, the whole monitor will shut down.

right, but we defer the wait() to be done after main() completes: code

And to be clear, i think adding a require around retainedTime<cutoverTIme seems fine to me.

so... lgtm please?

BTW maybe I should have clarified better that this pr is not a fix, it is just improving the error message when the test fails.

@msbutler
Copy link
Collaborator

i see. We can clean up this goroutine management in a seperate pr

@lidorcarmel
Copy link
Contributor Author

thanks!

bors r+

@lidorcarmel lidorcarmel added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Aug 10, 2023
@craig
Copy link
Contributor

craig bot commented Aug 10, 2023

Build succeeded:

@craig craig bot merged commit eff0185 into cockroachdb:master Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roachtest: c2c/tpcc/warehouses=1000/duration=60/cutover=30 failed
3 participants