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

metamorphic: limit aggregate injected I/O latency #3742

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Jul 10, 2024

Limit the amount of I/O latency injected into any individual run of the metamorphic test to improve worst-case test runtimes.

Informs #3681.
Informs #3733.

@jbowens jbowens requested a review from a team as a code owner July 10, 2024 16:43
@jbowens jbowens requested a review from RaduBerinde July 10, 2024 16:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

I'm unclear on how much of a contributor the I/O latency injection is to overall test time, but at least the failure in #3733 had it enabled. When target file sizes are small, or flush-split-bytes is low, or LBaseMaxBytes is low, it seems we can easily generate significant amounts of I/O.

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @RaduBerinde)

Copy link
Member

@RaduBerinde RaduBerinde 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: 0 of 6 files reviewed, 2 unresolved discussions (waiting on @jbowens)


vfs/errorfs/latency.go line 61 at r1 (raw file):

	mean  time.Duration
	limit time.Duration
	agg   time.Duration

this needs a comment


vfs/errorfs/latency.go line 88 at r1 (raw file):

	})
	time.Sleep(dur)
	rl.agg += dur

This needs to be an atomic or under a mutex, no?

Limit the amount of I/O latency injected into any individual run of the
metamorphic test to improve worst-case test runtimes.

Informs cockroachdb#3681.
Informs cockroachdb#3733.
Copy link
Collaborator Author

@jbowens jbowens 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: 0 of 6 files reviewed, 2 unresolved discussions (waiting on @RaduBerinde)


vfs/errorfs/latency.go line 88 at r1 (raw file):

Previously, RaduBerinde wrote…

This needs to be an atomic or under a mutex, no?

Thanks, I need more sleep

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm: Great idea.

Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on @jbowens)

@jbowens
Copy link
Collaborator Author

jbowens commented Jul 10, 2024

TFTR!

@jbowens jbowens merged commit 3b1077d into cockroachdb:master Jul 10, 2024
11 checks passed
@jbowens jbowens deleted the meta-limit-latency branch July 10, 2024 18:21
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