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

kvserver: unskip TestNewTruncateDecision #98792

Merged

Conversation

erikgrinaker
Copy link
Contributor

Passed after 10k stress runs. Has been skipped since 2019, issue seems to have been fixed in the meanwhile.

Resolves #38584.

Epic: none
Release note: None

@erikgrinaker erikgrinaker requested a review from a team March 16, 2023 17:35
@erikgrinaker erikgrinaker self-assigned this Mar 16, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@erikgrinaker erikgrinaker force-pushed the unskip-testnewtruncatedecision branch from 1fef267 to 675271a Compare March 16, 2023 18:54
@erikgrinaker
Copy link
Contributor Author

Saw this fail under stressrace:

    raft_log_queue_test.go:557: truncation should not have occurred, but truncatableIndexes changed from 1 -> 2
    raft_log_queue_test.go:560: truncation should not have occurred, but oldestIndex changed from 116 -> 117

Epic: none
Release note: None
@erikgrinaker erikgrinaker force-pushed the unskip-testnewtruncatedecision branch from 675271a to 563309c Compare March 20, 2023 16:40
@erikgrinaker
Copy link
Contributor Author

Disabling quiescence, as indicated in #38584 (comment), fixed it under stressrace too. Not pretty, but it works.

@@ -450,7 +449,11 @@ func TestNewTruncateDecision(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

skip.WithIssue(t, 38584)
// Unquiescing can add spurious empty log entries. Just disable it.
testingDisableQuiescence = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can it race with other tests that use this when tests are run in parallel?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Race or (worse) interact in random ways.

Copy link
Contributor Author

@erikgrinaker erikgrinaker Mar 20, 2023

Choose a reason for hiding this comment

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

We don't run tests in parallel in the same package, only separate packages (which are run as separate binaries).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does dev test --stress run separate binaries too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW, to run Go tests in parallel, they must explicitly opt in to it by calling t.Parallel(). We only do this in a handful of packages, and not in kvserver.

https://pkg.go.dev/testing#T.Parallel

Copy link
Collaborator

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

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

Still LGTM, assuming parallel test runs aren't possible.

@erikgrinaker
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 20, 2023

Build failed (retrying...):

@craig craig bot merged commit cb58230 into cockroachdb:master Mar 20, 2023
@craig
Copy link
Contributor

craig bot commented Mar 20, 2023

Build succeeded:

@erikgrinaker erikgrinaker deleted the unskip-testnewtruncatedecision branch March 21, 2023 08:53
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.

storage: TestNewTruncateDecision failed under stress [skipped]
3 participants