Skip to content

Commit 503eea9

Browse files
craig[bot]kev-cao
andcommitted
Merge #153297
153297: roachtest: deflake malformed subdir error in roachtests r=yuzefovich a=kev-cao #152937 forced the `subdir` provided in `RESTORE`/`SHOW BACKUP(S)` commands to match the expected format `YYYY/MM/DD-HHMMSS.SS` and fast fails if the subdir is not formatted correctly. Several of our roachtests are depending on older fixtures and therefore do not provide a valid subdir. This patch deflakes those failing tests by enforcing that `backup.index.read.enabled = false` before attempting to read from those older fixtures. The long term solution is to update these fixtures and ensure a properly formatted subdir is used. Fixes: #153267 Fixes: #153272 Fixes: #153268 Fixes: #153264 Fixes: #153240 Fixes: #153230 Fixes: #153237 Fixes: #153235 Fixes: #153234 Fixes: #153233 Fixes: #153232 Fixes: #153231 Fixes: #153230 Fixes: #153228 Fixes: #153320 Release note: None Co-authored-by: Kevin Cao <[email protected]>
2 parents 35f0ac7 + 570072f commit 503eea9

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

pkg/cmd/roachtest/tests/schemachange.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ func registerSchemaChangeDuringKV(r registry.Registry) {
4141
db := c.Conn(ctx, t.L(), 1)
4242
defer db.Close()
4343

44+
if _, err := db.Exec(`SET CLUSTER SETTING backup.index.read.enabled = false`); err != nil {
45+
t.Fatal(err)
46+
}
47+
4448
m := c.NewDeprecatedMonitor(ctx, c.All())
4549
m.Go(func(ctx context.Context) error {
4650
t.Status("loading fixture")

pkg/cmd/roachtest/tests/sqlsmith.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ WITH into_db = 'defaultdb', unsafe_restore_incompatible_version;
116116
allConns = append(allConns, c.Conn(ctx, t.L(), node))
117117
}
118118
conn := allConns[0]
119+
if _, err := conn.Exec(`SET CLUSTER SETTING backup.index.read.enabled = false`); err != nil {
120+
t.Fatal(err)
121+
}
119122
t.Status("executing setup")
120123
t.L().Printf("setup:\n%s", strings.Join(setup, "\n"))
121124
for _, stmt := range setup {

pkg/cmd/roachtest/tests/tpc_utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ func loadTPCHDataset(
4141
if err != nil {
4242
return err
4343
}
44+
if _, err := db.Exec(`SET CLUSTER SETTING backup.index.read.enabled = false`); err != nil {
45+
t.Fatal(err)
46+
}
4447
defer func() {
4548
if retErr == nil {
4649
if _, err = db.Exec("USE tpch"); err != nil {

pkg/cmd/roachtest/tests/tpcdsvec.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ func registerTPCDSVec(r registry.Registry) {
6565
); err != nil {
6666
t.Fatal(err)
6767
}
68+
if _, err := clusterConn.Exec(`SET CLUSTER SETTING backup.index.read.enabled = false`); err != nil {
69+
t.Fatal(err)
70+
}
6871
t.Status("restoring TPCDS dataset for Scale Factor 1")
6972
if _, err := clusterConn.Exec(
7073
`

0 commit comments

Comments
 (0)