{"record":{"id":"48dfd83272fc62da","repo":"apache/seatunnel","slug":"failed-to-resolve-schemachangeevent-just-skip","errorCode":null,"errorMessage":"Failed to resolve schemaChangeEvent, just skip.","messagePattern":"Failed to resolve schemaChangeEvent, just skip\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/row/SeaTunnelRowDebeziumDeserializeSchema.java","lineNumber":143,"sourceCode":"        }\n\n        log.debug(\"Unsupported record {}, just skip.\", record);\n    }\n\n    private void deserializeSchemaChangeRecord(\n            SourceRecord record, Collector<SeaTunnelRow> collector) {\n        SchemaChangeEvent schemaChangeEvent = null;\n        try {\n            if (schemaChangeResolver != null) {\n                schemaChangeEvent = schemaChangeResolver.resolve(record, tables);\n            }\n        } catch (SchemaEvolutionException e) {\n            // A resolver uses SchemaEvolutionException only when continuing would make the\n            // produced row schema diverge from the source relation. Keep generic parser failures\n            // backward-compatible, but fail fast for an explicitly classified schema error.\n            throw e;\n        } catch (Exception e) {\n            log.warn(\"Failed to resolve schemaChangeEvent, just skip.\", e);\n            return;\n        }\n        if (schemaChangeEvent == null) {\n            log.warn(\"Unsupported resolve schemaChangeEvent {}, just skip.\", record);\n            return;\n        }\n\n        // Filter before updating the produced schema, so the produced row shape stays in lockstep\n        // with the (filtered) sink schema. Only surviving events are applied below.\n        if (schemaChangeEventFilter != null) {\n            schemaChangeEvent = schemaChangeEventFilter.filter(schemaChangeEvent);\n        }\n        if (schemaChangeEvent == null) {\n            log.debug(\n                    \"Schema change event is fully filtered out by schema-changes.include/exclude, not applied to schema and not sent downstream.\");\n            return;\n        }\n","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/row/SeaTunnelRowDebeziumDeserializeSchema.java#L125-L161","documentation":"When a Debezium change record carries a schema change event (DDL), the CDC connector asks a resolver to translate it into a SeaTunnel schema change. If the resolver throws any generic exception (not a SchemaEvolutionException), the connector logs this warning and silently skips the event instead of failing the pipeline, keeping behavior backward-compatible. A SchemaEvolutionException is rethrown to fail fast because continuing would make the produced row schema diverge from the source relation.","triggerScenarios":"A DDL event (ALTER TABLE ADD/DROP/MODIFY COLUMN, CREATE/DROP TABLE) arrives in the WAL/binlog stream and deserializeSchemaChangeRecord's call to the schemaChangeEventResolver throws while parsing or applying it — e.g. an unparseable DDL statement, an unsupported column type in a new column, or a resolver bug.","commonSituations":"Streaming a table while running ALTER TABLE ADD COLUMN with an exotic or unsupported type; DDL dialects the resolver does not support; CDC connector version older than the database emitting newer DDL syntax; schema-registry or Debezium record shape changes across versions.","solutions":["Read the exception stack trace attached to this warning to find the actual resolver failure (unsupported type, parse error).","Upgrade the SeaTunnel CDC connector to a version whose schema resolver supports your DDL/data type.","If the skipped schema change matters downstream, apply the schema change to the sink manually and restart the pipeline so a fresh snapshot picks up the new schema.","If silent divergence is unacceptable, extend the deserializer to classify such errors as SchemaEvolutionException so the job fails fast instead of skipping.","Re-run the job from an earlier checkpoint/snapshot so the affected records are re-read with the correct schema."],"exampleFix":"// before: generic failures are silently skipped, sink schema may drift\nlog.warn(\"Failed to resolve schemaChangeEvent, just skip.\", e);\n// after: only skip generic parser failures, fail fast on classified schema errors\n} catch (SchemaEvolutionException e) {\n    throw e;\n} catch (Exception e) {\n    log.warn(\"Failed to resolve schemaChangeEvent, just skip.\", e);\n    return;\n}","handlingStrategy":"fallback","validationCode":"// validate that DDL used in the pipeline is resolvable before production\nSchemaChangeEvent evt = resolver.resolve(testDdlRecord);\nif (evt == null) {\n    log.warn(\"DDL will be skipped by deserializer; downstream schema will drift\");\n}","typeGuard":"boolean failsFast(Exception e) {\n    return e instanceof SchemaEvolutionException; // classified schema errors must not be swallowed\n}","tryCatchPattern":"try {\n    resolver.resolve(record);\n} catch (SchemaEvolutionException e) {\n    throw e; // schema divergence: fail the job\n} catch (Exception e) {\n    log.warn(\"Failed to resolve schemaChangeEvent, just skip.\", e);\n}","preventionTips":["Keep the CDC connector version current with your database's DDL features.","Test DDL migrations on a staging CDC pipeline before applying them to production tables.","Monitor logs for this warning during schema changes and reconcile sink schemas afterward.","Classify known schema-divergence errors as SchemaEvolutionException so they fail fast rather than being skipped."],"tags":["cdc","schema-evolution","debezium","ddl"],"backgroundTag":"schema-validation-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}