Skip to content

Commit 4e4d8ca

Browse files
authored
Merge pull request #142939 from cockroachdb/blathers/backport-release-24.1-142913
release-24.1: changefeedccl: fix race in TestChangefeedSchemaChangeAllowBackfill
2 parents d9d939a + 3bf5640 commit 4e4d8ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/ccl/changefeedccl/changefeed_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,6 @@ func TestChangefeedSchemaChangeAllowBackfill(t *testing.T) {
28852885
`drop_column: [2]->{"after": {"a": 2, "b": "2"}}`,
28862886
})
28872887
sqlDB.Exec(t, `ALTER TABLE drop_column DROP COLUMN b`)
2888-
sqlDB.Exec(t, `INSERT INTO drop_column VALUES (3)`)
28892888
ts := schematestutils.FetchDescVersionModificationTime(t, s.TestServer.Server, `d`, `public`, `drop_column`, 2)
28902889

28912890
// Backfill for DROP COLUMN b.
@@ -2896,7 +2895,8 @@ func TestChangefeedSchemaChangeAllowBackfill(t *testing.T) {
28962895
ts.AsOfSystemTime()),
28972896
})
28982897

2899-
// Insert 3 into drop_column
2898+
// Insert 3 into drop_column.
2899+
sqlDB.Exec(t, `INSERT INTO drop_column VALUES (3)`)
29002900
assertPayloadsStripTs(t, dropColumn, []string{
29012901
`drop_column: [3]->{"after": {"a": 3}}`,
29022902
})
@@ -2937,6 +2937,7 @@ func TestChangefeedSchemaChangeAllowBackfill(t *testing.T) {
29372937
// version 2. Then, when adding column c, it goes from 9->17, with the schema change being visible at
29382938
// the 7th step (version 15). Finally, when adding column d, it goes from 17->25 ith the schema change
29392939
// being visible at the 7th step (version 23).
2940+
// TODO(#142936): Investigate if this descriptor version hardcoding is sound.
29402941
dropTS := schematestutils.FetchDescVersionModificationTime(t, s.TestServer.Server, `d`, `public`, `multiple_alters`, 2)
29412942
addTS := schematestutils.FetchDescVersionModificationTime(t, s.TestServer.Server, `d`, `public`, `multiple_alters`, 15)
29422943
addTS2 := schematestutils.FetchDescVersionModificationTime(t, s.TestServer.Server, `d`, `public`, `multiple_alters`, 23)

0 commit comments

Comments
 (0)