Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
103228: roachtest: change some cluster settings during mixed-version backups r=smg260 a=renatolabs

This commit makes some final (for now) changes to the
`backup-restore/mixed-version` roachtest. Specifically:

* we set some backup/restore related cluster settings. These are
publicly documented settings and should help expose corner cases that
might be harder to come up naturally using the default settings. This
is an area that is known to need more tests, as described in a recent
postmortem [1].

* introduce a background function that executes statements that lead
to rows being inserted into system tables, particularly those that are
generally empty in most tests.

* simplify the workload setup in the test: the `bank` workload is
responsible for testing edge cases, while `tpcc` is a workload that
should better represent customer workloads.

* verify that backups taken in mixed-version can be restored both in
the previous version and in the next version. Previously, we were only
testing the next version.

Note that most of these changes are not specificaly related to the
mixed-version context this test is in. In the future, these features
should be packaged in a format that is easier to consume by other
tests.

[1] https://cockroachlabs.atlassian.net/wiki/spaces/ENG/pages/3013804060/Postmortem+101963+revision+history+backups

Epic: none

Release note: None



103590: roachtest: add GCP 400 incremental layer restore test r=rhu713 a=rhu713



Co-authored-by: Renato Costa <[email protected]>
Co-authored-by: Rui Hu <[email protected]>
  • Loading branch information
3 people committed May 24, 2023
3 parents 23de673 + 19383d7 + 746d4ff commit cb2c41a
Show file tree
Hide file tree
Showing 3 changed files with 527 additions and 142 deletions.
11 changes: 11 additions & 0 deletions pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,17 @@ func NewTest(
}
}

// RNG returns the underlying random number generator used by the
// mixedversion framework to generate a test plan. This rng can be
// used to make random decisions during test setup.
//
// Do NOT use the rng returned by this function in mixedversion hooks
// (functions passed to `InMixedVersion` and similar). Instead, use
// the rng instance directly passed as argument to those functions.
func (t *Test) RNG() *rand.Rand {
return t.prng
}

// InMixedVersion adds a new mixed-version hook to the test. The
// functionality in the function passed as argument to this function
// will be tested in arbitrary mixed-version states. If multiple
Expand Down
Loading

0 comments on commit cb2c41a

Please sign in to comment.