Changefeed perturbation test#164374
Draft
rharding6373 wants to merge 2 commits intocockroachdb:masterfrom
Draft
Conversation
Collaborator
rharding6373
commented
Feb 25, 2026
Add a new randomized perturbation test (TestChangefeedPerturbation) that exercises changefeeds with random table schemas, random DML operations, random schema changes that trigger backfills, and system perturbations (pause/resume, splits, transaction push/abort). The test uses randgen.RandColumnType to generate diverse column types, filters for changefeed-safe types, and validates ordering and delivery guarantees using OrderValidator, TopicValidator, and conditionally MvccTimestampValidator and KeyInValueValidator. Key features: - Random table schemas with 2-8 non-PK columns of diverse SQL types - Weighted random event loop with DML, schema changes, and perturbations - Schema changes that trigger backfills (ADD COLUMN with DEFAULT, STORED computed columns, NOT NULL constraints; DROP COLUMN) - Drain phase that validates expected row delivery after the event loop, catching bugs where backfills are silently skipped - Duplicate message detection across pause/resume and range splits - DECIMAL type excluded due to JSON parsing issues with large exponents Epic: none Release note: None Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add optional column family support to the perturbation test. When enabled (50% of the time), the table is created with two column families and the changefeed targets each family explicitly. This exercises a different code path in the schema feed's column-drop detection (droppedColumnIsWatched) that was involved in cockroachdb#149861. Column family interactions require adjustments to event counting: - Each DML operation produces one event per family - Families with all-NULL columns have no KV entry and produce no event - The drain phase subtracts maximum possible overcounting before validating row delivery Epic: none Release note: None Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Contributor
|
Merging to
|
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.