[FLINK-40201] Fix Oracle CDC compatibility with Oracle 26ai and Debezium 3.4.2.Final - #4481
Open
Suhel0328 wants to merge 1 commit into
Open
Conversation
…ium 3.4.2.Final Upgrade Debezium dependency to 3.4.2.Final to support Oracle 26ai (23.26.x) and apply all source-level fixes required for API compatibility across JDBC connectors. Oracle CDC specific fixes: - Update vendored LogMinerChangeRecordEmitter to 9-arg constructor (rowId removed in Debezium 3.4.2) to fix NoSuchMethodError from UnbufferedLogMinerStreamingChangeEventSource - Add local ResumePositionProvider override: null-guard on sessionContext in close() and catch block; strip database.* prefix from JdbcConfiguration before OracleConnection - Fix OracleUtils.queryApproximateRowCnt() to use ALL_TABLES.NUM_ROWS instead of ANALYZE TABLE to avoid ORA-01031 for CDC users without ANALYZE ANY privilege - Fix OracleSchema.getTableSchema() to use catalog-agnostic TableFilter so readSchema() works in CDB/PDB mode where Oracle JDBC returns PDB name as TABLE_CAT - Guard isRecordBetween() against absent ROWID Connect header; fall back to SCN-range inclusion for tables without a primary key - Include debezium-common in shade assembly to prevent ClassNotFoundException at runtime - Add EmbeddedFlinkSchemaHistory and RelationalDatabaseSchema adapters for Debezium 3.x API Debezium 3.x API compatibility (all JDBC source connectors): - Rename EmbeddedFlinkDatabaseHistory to EmbeddedFlinkSchemaHistory (Debezium 3.x rename) - Replace DatabaseHistory with SchemaHistory (Debezium 3.x rename) - Update SchemaNameAdjuster import: io.debezium.util -> io.debezium.spi.schema - Update TopicSelector to TopicNamingStrategy across base dispatcher - Replace quotedColumnIdString() with quoteIdentifier() (Postgres/SQL Server) Tested end-to-end: 3 snapshot rows + live CDC UPDATE confirmed in StarRocks sink using Oracle 26ai FREE CDB/FREEPDB1 with Debezium 3.4.2.Final. See: https://issues.apache.org/jira/browse/FLINK-40201 Generated-by: Claude Code (Anthropic)
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.
What is the purpose of the change
Fixes 7 runtime errors that prevent the Oracle CDC connector from working with Oracle 26ai (CDB/PDB mode) when using Debezium 3.4.2.Final. Also applies the required Debezium 3.x API compatibility fixes across all JDBC source connectors (MySQL, DB2, Postgres, SQL Server) that result from the version upgrade.
JIRA: https://issues.apache.org/jira/browse/FLINK-40201
Brief change log
NoSuchMethodErroronLogMinerChangeRecordEmitter(10-arg → 9-arg constructor to match Debezium 3.4.2)ResumePositionProviderlocal override:sessionContextnull-guard anddatabase.*prefix stripORA-01031: useALL_TABLES.NUM_ROWSinstead ofANALYZE TABLETableFilterisRecordBetween()against absent ROWID Connect header (Debezium 3.4.2 no longer injects it)debezium-commonin shade assembly to preventClassNotFoundExceptionEmbeddedFlinkSchemaHistory/RelationalDatabaseSchemafor Debezium 3.x APIDatabaseHistory→SchemaHistory,SchemaNameAdjusterpackage,TopicSelector→TopicNamingStrategyacross all JDBC connectorsVerifying this change
Tested end-to-end: Oracle 26ai FREE (CDB + FREEPDB1) → Flink CDC 3.6-SNAPSHOT → StarRocks sink.
AI Disclosure