Skip to content

Commit b1ae7bb

Browse files
craig[bot]fqazispilchen
committed
147852: roachtest: enable create_table_with_schema_locked for ORM tests r=fqazi a=fqazi Previously, schema_locked had to be manually set after creating objects, to make sure objects were schema_locked. We recently added the ability to create tables by default with schema_locked, which we will enable by default in our ORM tests. Informs: #129694 Release note: None 147988: workload/schemachanger: temporarily skip DROP TRIGGER in RSW r=spilchen a=spilchen In the random schemachanger workload, you can hit an infinite recursion case when doing a cascading drop with the legacy schema changer. This root cause of this is that DROP TRIGGER can end up orphaning a backref. The fix for the root cause will be addressed in #147981. Until that is fixed, this change will skip DROP TRIGGER so we avoid the infinite recursion. Fixes #147514 Epic: none Release note: none Co-authored-by: Faizan Qazi <[email protected]> Co-authored-by: Matt Spilchen <[email protected]>
3 parents 76d4f47 + 5556c9f + 6660ffe commit b1ae7bb

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

pkg/cmd/roachtest/tests/django_blocklist.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ var enabledDjangoTests = []string{
158158

159159
// Maintain that this list is alphabetized.
160160
var djangoBlocklist = blocklist{
161+
// Schema change used by this test:
162+
// ALTER TABLE schema_author ALTER COLUMN name SET DATA TYPE STRING, ALTER COLUMN name DROP NOT NULL
163+
`schema.tests.SchemaTests.test_alter`: "ALTER COLUMN ... DROP NOT NULL is not supported in declarative schema changer (prevents from working with schema_locked)",
161164
`schema.tests.SchemaTests.test_alter_text_field_to_date_field`: "alter type requires USING",
162165
`schema.tests.SchemaTests.test_alter_text_field_to_datetime_field`: "alter type requires USING",
163166
`schema.tests.SchemaTests.test_alter_text_field_to_time_field`: "alter type requires USING",

pkg/cmd/roachtest/tests/orm_helpers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func alterZoneConfigAndClusterSettings(
7777
`ALTER ROLE ALL SET statement_timeout = '60s'`,
7878
`ALTER ROLE ALL SET default_transaction_isolation = 'read committed'`,
7979
`ALTER ROLE ALL SET autocommit_before_ddl = 'true'`,
80+
`ALTER ROLE ALL SET create_table_with_schema_locked='true'`,
8081
} {
8182
if _, err := db.ExecContext(ctx, cmd); err != nil {
8283
return err

pkg/workload/schemachange/optype.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ var opWeights = []int{
315315
dropSchema: 1,
316316
dropSequence: 1,
317317
dropTable: 1,
318-
dropTrigger: 1,
318+
dropTrigger: 0, // TODO(147981): re-enable once we fix orphaning of backref in DROP TRIGGER
319319
dropView: 1,
320320
renameIndex: 1,
321321
renameSequence: 1,

0 commit comments

Comments
 (0)