Skip to content

Commit

Permalink
roachtest: handle tables added in 19.2
Browse files Browse the repository at this point in the history
Fixes #40662

Release justification: Test only.

Release note: None
  • Loading branch information
andreimatei committed Sep 19, 2019
1 parent 809e4c2 commit 5c45674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 7 additions & 2 deletions pkg/cmd/roachtest/gossip.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,14 @@ func runGossipRestartNodeOne(ctx context.Context, t *test, c *cluster) {
run(`ALTER DATABASE system %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
run(`ALTER RANGE meta %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
run(`ALTER RANGE liveness %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
// TODO(andrei): Changing the constraints for the system tables shouldn't be
// needed given that we've changed them for the system zone. What's going on?
// #40921.
run(`ALTER TABLE system.jobs %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
run(`ALTER TABLE system.replication_stats %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
run(`ALTER TABLE system.replication_constraint_stats %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
if t.IsBuildVersion("v19.2.0") {
run(`ALTER TABLE system.replication_stats %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
run(`ALTER TABLE system.replication_constraint_stats %[1]s CONFIGURE ZONE %[2]s 'constraints: {"-rack=0"}'`)
}

var lastReplCount int
if err := retry.ForDuration(2*time.Minute, func() error {
Expand Down
2 changes: 0 additions & 2 deletions pkg/cmd/roachtest/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ func (t *test) IsBuildVersion(minVersion string) bool {
return t.buildVersion.AtLeast(vers)
}

var _ = (*test)(nil).IsBuildVersion // avoid unused lint

// teamCityEscape escapes a string for use as <value> in a key='<value>' attribute
// in TeamCity build output marker.
// Documentation here: https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-Escapedvalues
Expand Down

0 comments on commit 5c45674

Please sign in to comment.