Skip to content

Commit

Permalink
acceptance: enable tracing in acceptance/version-upgrade
Browse files Browse the repository at this point in the history
If we introduced NPEs due to incompatibilities between versions, we
would want to find out. Enabling tracing globally while upgrading
clusters should help.

Release note: None
  • Loading branch information
tbg committed Feb 8, 2021
1 parent a9eae13 commit 49ff09c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/cmd/roachtest/versionupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ func runVersionUpgrade(ctx context.Context, t *test, c *cluster, buildVersion ve
//
// See the comment on createCheckpoints for details on fixtures.
uploadAndStartFromCheckpointFixture(c.All(), predecessorVersion),
// Turn tracing on globally to give it a fighting chance at exposing
// any crash-inducing incompatibilities or horrendous memory leaks.
// (It won't catch most memory leaks since this test doesn't run for
// too long or does too much work).
enableTracingGloballyStep,
uploadAndInitSchemaChangeWorkload(),
waitForUpgradeStep(c.All()),
testFeaturesStep,
Expand Down Expand Up @@ -354,6 +359,15 @@ func binaryUpgradeStep(nodes nodeListOption, newVersion string) versionStep {
}
}

func enableTracingGloballyStep(ctx context.Context, t *test, u *versionUpgradeTest) {
db := u.conn(ctx, t, 1)
// NB: this enables net/trace, and as a side effect creates verbose trace spans everywhere.
_, err := db.ExecContext(ctx, `SET CLUSTER SETTING trace.debug.enable = $1`, true)
if err != nil {
t.Fatal(err)
}
}

func preventAutoUpgradeStep(node int) versionStep {
return func(ctx context.Context, t *test, u *versionUpgradeTest) {
db := u.conn(ctx, t, node)
Expand Down

0 comments on commit 49ff09c

Please sign in to comment.