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/mixedversion: upgrade plan should be bounded #137963

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srosenberg
Copy link
Member

@srosenberg srosenberg commented Dec 24, 2024

Previously, the mixedversion framework did not bound
the total number of steps in a test plan. Since steps
are generated according to different pseudo-random
distributions, the total number of resulting steps
can vary significantly.
E.g., for tpcc/mixed-headroom/n5cpu16, the smallest
test plan has 14 steps, whereas the largest, based
on a sampling of 1_000_000 valid test plans, has
135 steps!

High variability in the size of the test plan
is directly proportional to the running time.
Thus, a very large test plan can cause a test
to time out, due to exceeding its max running time.
That is the case for tpcc/mixed-headroom/n5cpu16.

This PR adds an option, namely MaxNumPlanSteps,
which enforces an upper bound. If a generated
test plan exceeds the specified value, a new
one is generated until the resulting length
is within the specification.

This PR also adds a primitive dry-run mode,
which can be useful for debugging test plans.
If MVT_DRY_RUN_MODE env. var. is set, print
the mixedversion test plan and exit.

Resolves: #138014
Informs: #137332
Epic: none
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@srosenberg srosenberg force-pushed the sr/roachtest_mvt_dry_run branch from 12b2274 to 1a5ca92 Compare December 28, 2024 03:07
Previously, the mixedversion framework did not bound
the total number of steps in a test plan. Since steps
are generated according to different pseudo-random
distributions, the total number of resulting steps
can vary significantly.
E.g., for `tpcc/mixed-headroom/n5cpu16`, the smallest
test plan has 14 steps, whereas the largest, based
on a sampling of 1_000_000 valid test plans, has
135 steps!

High variability in the size of the test plan
is directly proportional to the running time.
Thus, a very large test plan can cause a test
to time out, due to exceeding its max running time.
That is the case for `tpcc/mixed-headroom/n5cpu16`.

This PR adds an option, namely `MaxNumPlanSteps`,
which enforces an upper bound. If a generated
test plan exceeds the specified value, a new
one is generated until the resulting length
is within the specification.

This PR also adds a primitive `dry-run` mode,
which can be useful for debugging test plans.
If `MVT_DRY_RUN_MODE` env. var. is set, print
the mixedversion test plan and exit.

Resolves: cockroachdb#138014
Informs: cockroachdb#137332
Epic: none
Release note: None
@srosenberg srosenberg force-pushed the sr/roachtest_mvt_dry_run branch from 1a5ca92 to 0fb9b38 Compare December 29, 2024 03:03
@srosenberg
Copy link
Member Author

SELECT_PROBABILITY=1.0 && TESTS=^.*mixed.*$

@srosenberg srosenberg changed the title roachtest: primitive dry-run mode for mixedversion tests roachtest/mixedversion: upgrade plan should be bounded Dec 30, 2024
@srosenberg srosenberg marked this pull request as ready for review December 31, 2024 18:20
@srosenberg srosenberg requested a review from a team as a code owner December 31, 2024 18:20
@srosenberg srosenberg requested review from nameisbhaskar, vidit-bhat and DarrylWong and removed request for a team December 31, 2024 18:20
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.

roachtest/mixedversion: upgrade plan should be bounded
2 participants