[DebeziumIO] Upgrade to Debezium 3.5.2.Final - #39569
Open
tkaymak wants to merge 3 commits into
Open
Conversation
getRecordSchema copied the connector configuration, set snapshot.mode on the copy, then passed the original unmodified map to getOneRecord. The override therefore never took effect, and schema inference has always run with the connector's configured snapshot mode. Drop the dead copy rather than start honouring it. getOneRecord derives the schema by sampling an actual data record, so a schema-only snapshot would emit nothing and schema inference would fail with "could not fetch database schema". No behaviour change.
Debezium 3.5 builds against Kafka Connect 4.1.2, so the connect-api pin moves from 3.9.0 to 4.1.2 and kafka-clients is declared and forced to the same version. Connect 4.1 added an abstract pluginMetrics() to SourceTaskContext; BeamSourceTaskContext returns null, which is safe here because no Debezium 3.5.2 connector calls it. Debezium 3.5 split debezium-core into smaller modules, so debezium-config and debezium-connector-common are now declared explicitly. The expansion-service shadow jar was checked to still bundle the split classes and all five connectors. The Postgres connector needs JDBC driver 42.7.x, so 42.7.7 is forced in this module only, matching the upstream Debezium 3.5.2 pin. The Beam-wide 42.6.2 pin from 24f562d is deliberately left untouched. Test updates for 3.5 behaviour changes: connection failures now surface wrapped in a RetriableException, so the schema transform tests unwrap the cause chain, and the example-mysql image now names its binlog mysql-bin.000003 instead of binlog.000002. 3.6.0 was skipped for now because of open MySQL DDL parser regressions in that line.
The default schema history implementation was registered under the pre-Debezium-2.0 key database.history, which Debezium 3.x ignores. As a result DebeziumSDFDatabaseHistory was unreachable unless users set schema.history.internal explicitly and historized connectors silently fell back to KafkaSchemaHistory pointing at localhost:9092. Registering the default under schema.history.internal makes the Beam native history implementation the default again as originally intended. Users who set schema.history.internal themselves are unaffected.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
tkaymak
force-pushed
the
debezium-3.5.2-upgrade
branch
from
July 31, 2026 10:46
e79a6be to
0d0e955
Compare
Contributor
|
Assigning reviewers: R: @tvalentyn for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
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.
Addresses #39568.
Upgrades
DebeziumIOfrom Debezium3.1.3.Finalto3.5.2.Final.3.6.0is deliberately skipped: it shipped a rewritten MySQL DDL parser with several open regressions and there is no3.6.1yet. A follow-up bump should be trivial once that line settles.Commits
The branch is split so the mechanical bump can be reviewed separately from the two behavioural pieces:
Remove dead snapshot.mode override in DebeziumIO.getRecordSchema—getRecordSchemacopied the connector config, setsnapshot.modeon the copy, then passed the original map togetOneRecord. The override never took effect. The dead copy is dropped rather than honoured, becausegetOneRecordsamples a real data record to derive the schema, so a schema-only snapshot would emit nothing and inference would fail. No behaviour change, and this commit stands alone against master.Upgrade DebeziumIO to Debezium 3.5.2.Final— the upgrade proper.Wire DebeziumSDFDatabaseHistory default to schema.history.internal— a genuine behaviour fix, kept separate so it can be dropped independently if reviewers prefer.Notable points for review
connect-apimoves 3.9.0 → 4.1.2 withkafka-clientsdeclared and forced to match. Connect 4.1 added an abstractpluginMetrics()toSourceTaskContext;BeamSourceTaskContextreturnsnull. I verified no Debezium 3.5.2 connector jar referencespluginMetrics, so this is unreachable in practice.debezium-coremodule split. 3.5 split core into smaller modules, sodebezium-configanddebezium-connector-commonare declared explicitly. I checked the expansion-service shadow jar still bundlesio/debezium/config/Configuration.class,AbstractSchemaHistory, and all five connectors.42.7.7is forced in this module only, matching the upstream Debezium 3.5.2 pin. The Beam-wide42.6.2CVE pin from 24f562d is untouched.database.history, the pre-Debezium-2.0 key that 3.x ignores.DebeziumSDFDatabaseHistorywas therefore unreachable by default, and historized connectors silently fell back toKafkaSchemaHistorypointing atlocalhost:9092. Users who setschema.history.internalthemselves are unaffected.Test changes
Two adaptations to 3.5 behaviour, not masked failures:
RetriableExceptionrather than a top-levelDebeziumException, so the schema transform tests unwrap the cause chain.example-mysqlimage setslog_bin = mysql-bin, so the binlog ismysql-bin.000003rather thanbinlog.000002. I confirmed this is deterministic for a fresh container rather than a rotation artifact.CHANGES.md
Intentionally not touched yet. Proposed entry once this is approved:
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.