Skip to content

Commit 00a0198

Browse files
committed
roachtest: disable schema locked for follower-reads
Previously, this test used ALTER TABLE .. SET LOCALITY which is not supported without manually unsetting schema_locked. To address this, this patch disables schema_locked for new tables within this test. Fixes: #148996 Fixes: #149018 Fixes: #149015 Fixes: #149013 Fixes: #148997 Fixes: #149047 Fixes: #149045 Fixes: #149017 Fixes: #149014 Fixes: #149019 Fixes: #149016 Fixes: #149012 Release note: None
1 parent 79e136a commit 00a0198

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/cmd/roachtest/tests/follower_reads.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,13 @@ func initFollowerReadsDB(
527527
}
528528
}
529529

530+
// Disable schema_locked within this since it will modify locality on
531+
// tables.
532+
_, err = db.ExecContext(ctx, "SET create_table_with_schema_locked=false")
533+
require.NoError(t, err)
534+
_, err = db.ExecContext(ctx, "ALTER ROLE ALL SET create_table_with_schema_locked=false")
535+
require.NoError(t, err)
536+
530537
// Create a multi-region database and table.
531538
_, err = db.ExecContext(ctx, `CREATE DATABASE mr_db`)
532539
require.NoError(t, err)

0 commit comments

Comments
 (0)