@@ -1931,27 +1931,32 @@ func TestNoBackfillAfterNonTargetColumnDrop(t *testing.T) {
1931
1931
}
1932
1932
1933
1933
// Open up the changefeed.
1934
- cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c` , args ... )
1934
+ // We specify `updated` so that identical messages with different timestamps
1935
+ // aren't filtered out as duplicates. The appearance of such messages would
1936
+ // indicate that a backfill did happen even though it should not have.
1937
+ cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c WITH updated` , args ... )
1935
1938
defer closeFeed (t , cf )
1936
- assertPayloads (t , cf , []string {
1939
+ assertPayloadsStripTs (t , cf , []string {
1937
1940
`hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
1938
1941
})
1939
1942
1940
1943
sqlDB .Exec (t , `ALTER TABLE hasfams DROP COLUMN a` )
1941
1944
sqlDB .Exec (t , `INSERT INTO hasfams VALUES (1, 'b1', 'c1')` )
1942
- assertPayloads (t , cf , []string {
1945
+ assertPayloadsStripTs (t , cf , []string {
1943
1946
`hasfams.b_and_c: [1]->{"after": {"b": "b1", "c": "c1"}}` ,
1944
1947
})
1945
1948
1946
1949
// Check that dropping a watched column still backfills.
1947
1950
sqlDB .Exec (t , `ALTER TABLE hasfams DROP COLUMN c` )
1948
- assertPayloads (t , cf , []string {
1951
+ assertPayloadsStripTs (t , cf , []string {
1949
1952
`hasfams.b_and_c: [0]->{"after": {"b": "b"}}` ,
1950
1953
`hasfams.b_and_c: [1]->{"after": {"b": "b1"}}` ,
1951
1954
})
1952
1955
}
1953
1956
1954
- cdcTest (t , testFn )
1957
+ runWithAndWithoutRegression141453 (t , testFn , func (t * testing.T , testFn cdcTestFn ) {
1958
+ cdcTest (t , testFn )
1959
+ })
1955
1960
}
1956
1961
1957
1962
func TestChangefeedColumnDropsWithFamilyAndNonFamilyTargets (t * testing.T ) {
0 commit comments