maria: classify compressed columns errors + add validation for create mirror#4559
maria: classify compressed columns errors + add validation for create mirror#4559dtunikov wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class handling for MariaDB COMPRESSED columns, which go-mysql cannot decode, by (a) rejecting mirrors at validation time when such columns exist and (b) classifying/raising a dedicated error if a compressed column appears mid-CDC via TABLE_MAP detection.
Changes:
- Introduces
MySQLUnsupportedCompressedColumnErrorand wires it into the alerting classifier for user notification. - Adds MariaDB source validation that scans table schemas for
COMPRESSEDcolumns and rejects mirror creation. - Adds CDC-time detection (TABLE_MAP wire types 140/141) plus unit/e2e coverage for both “rejected at creation” and “added mid-stream” scenarios.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| flow/shared/exceptions/mysql.go | Adds a typed error for unsupported MariaDB COMPRESSED columns. |
| flow/pkg/mysql/validation.go | Adds IsCompressedColumnType + table-level validation query for COMPRESSED columns. |
| flow/pkg/mysql/validation_test.go | Unit tests for COMPRESSED column type detection helper. |
| flow/e2e/clickhouse_mysql_test.go | E2E coverage for mirror validation rejection + mid-CDC detection. |
| flow/connectors/mysql/validate.go | Hooks COMPRESSED-column validation into mirror source validation for MariaDB flavor. |
| flow/connectors/mysql/type_conversion.go | Errors out early when a column type string indicates COMPRESSED. |
| flow/connectors/mysql/qvalue_convert_test.go | Unit test ensuring type conversion rejects COMPRESSED. |
| flow/connectors/mysql/cdc.go | Detects COMPRESSED wire types in TABLE_MAP events and returns typed exception. |
| flow/connectors/mysql/cdc_test.go | Unit tests for TABLE_MAP compressed-column detection + typed error contents. |
| flow/alerting/classifier.go | Classifies the new typed exception into a NotifyUser error class. |
| flow/alerting/classifier_test.go | Tests classifier mapping for the new COMPRESSED-column exception. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
❌ Test FailureAnalysis: Every MariaDB CDC e2e test times out waiting for CDC/snapshot data — reproduced deterministically across all three matrix jobs on this MariaDB-focused PR — indicating a real bug the PR introduced in the MariaDB pipeline, not a flaky failure. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
🔄 Flaky Test DetectedAnalysis: The flow/e2e package hit its 20-minute wall-clock timeout with many unrelated ClickHouse tests still stuck in EnvWaitFor CDC-sync polling loops — a classic e2e timeout flake from a slow/contended runner, not an assertion failure or a bug in the MariaDB compressed-columns PR. ✅ Automatically retrying the workflow |
🔄 Possible Flaky TestAnalysis: All three flow/e2e matrix jobs hit the 20-minute package wall-clock timeout (1200.9s) while every in-flight test showed healthy short durations (3s–1m7s) with no test hung in EnvWaitFor, indicating the heavy e2e suite narrowly exceeded its time budget under slow/contended CI rather than a specific test failing or deadlocking. |
❌ Test FailureAnalysis: All three MySQL/MariaDB e2e matrix variants consistently hung to the 20-minute package timeout (panic: test timed out, no assertion failure) in exactly the area this PR modifies, indicating a real hang/deadlock rather than a flaky failure. |
…db-compressed-columns
…B-io/peerdb into dbi-847-mariadb-compressed-columns
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
❌ Test FailureAnalysis: The newly-added Test_MariaDB_CompressedColumn_AddedMidCDC fails deterministically across all three MariaDB_CH matrix configs by timing out waiting for the PR's own new compressed-column error to appear, indicating a real bug in the feature under test rather than flakiness. |
❌ Test FailureAnalysis: All 3 MySQL matrix jobs hit a 20-minute e2e package timeout with only MySQL tests stuck in EnvWaitFor (replication never delivered rows), a deterministic MySQL-specific replication stall on a PR that specifically changes MySQL/MariaDB handling — consistent with a real regression, not flakiness. |
❌ Test FailureAnalysis: The failure is a WaitFor timeout in Test_MariaDB_CompressedColumn_AddedMidCDC, a brand-new test added by this PR to verify its own compressed-column handling feature, which never produced the expected snapshot/error behavior — a real functional bug rather than an intermittent infra failure. |
❌ Test FailureAnalysis: The new feature test Test_MariaDB_CompressedColumn_AddedMidCDC deterministically fails because MariaDB's compressed-column binlog type (140) is unhandled ("unsupport type 140 in binlog"), so the expected compressed-column-error condition never occurs — a real bug in the PR's feature, not flakiness. |
❌ Test FailureAnalysis: The PR's own new test Test_MariaDB_CompressedColumn_AddedMidCDC fails deterministically across multiple matrix legs because the code emits an unhandled "unsupport type 140 in binlog" error instead of the classified compressed-column error the test expects — a real feature bug, not flakiness. |
mariadb has
COMPRESSEDcolumn featurego-mysql can't decode such columns
now we classify if such column is added mid cdc stream
we also validate the source and error out if there are compressed columns