Skip to content

Commit d0acab8

Browse files
committed
schemachangerccl: limit number of stages tested for MR
Previously, this test was timing out frequently because of the number of stages that we were testing causing it to hit the test timeout. This patch reduces the number of stages tested on MR for declarative schema changes during backup / restore. This patch also adjusts timeout waiting for schema changes to allow for stress runs for testing. Release note: None Fixes: #154993 Fixes: #155137 Fixes: #154786 Fixes: #152076 Fixes: #155327 Fixes: #154805 Fixes: #155147
1 parent 738c039 commit d0acab8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pkg/sql/schemachanger/sctest/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const skipRate = .6
129129

130130
// Stop once max stages has been hit.
131131
const maxStagesToTest = 8
132-
const maxStagesToTestMultiRegion = 6
132+
const maxStagesToTestMultiRegion = 4
133133

134134
// shouldSkipBackup samples about 60% of total stages or up to
135135
// max stages.

pkg/sql/schemachanger/sctest/framework.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,14 @@ func waitForSchemaChangesToSucceed(t *testing.T, tdb *sqlutils.SQLRunner) {
965965
}
966966

967967
func waitForSchemaChangesToFinish(t *testing.T, tdb *sqlutils.SQLRunner) {
968+
// Wait longer on stress for schema changes.
969+
if skip.Stress() {
970+
old := tdb.SucceedsSoonDuration
971+
tdb.SucceedsSoonDuration = time.Minute * 2
972+
defer func() {
973+
tdb.SucceedsSoonDuration = old
974+
}()
975+
}
968976
tdb.CheckQueryResultsRetry(
969977
t, schemaChangeWaitQuery(`('succeeded', 'failed')`), [][]string{},
970978
)

0 commit comments

Comments
 (0)