Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
40923: roachtest: handle tables added in 19.2 r=andreimatei a=andreimatei

Fixes cockroachdb#40662

Release justification: Test only.

Release note: None

Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
  • Loading branch information
craig[bot] and andreimatei committed Sep 20, 2019
2 parents 8e300bf + 5c45674 commit 4853ae2
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 4853ae2

Please sign in to comment.