[ 
https://issues.apache.org/jira/browse/FLINK-41777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18153906#comment-18153906
 ] 

Xin Chen commented on FLINK-41777:
----------------------------------

h3. Root Cause

There is a case-sensitivity mismatch between the Pipeline connector and the 
underlying Debezium-based Oracle source connector:
 # *Graph building phase ({{{}OracleDataSourceFactory{}}} / 
{{{}OracleSchemaUtils{}}}):* {{OracleSchemaUtils.listTables}} lower-cases both 
schema and table names 
({{{}TableId.tableId(schemaName.toLowerCase(Locale.ROOT), 
tableName.toLowerCase(Locale.ROOT)){}}}). 
{{OracleDataSourceFactory.getTableList}} then passes these lower-cased names 
(e.g. {{{}debezium.products{}}}) into {{{}table.include.list{}}}.
 # *Reader phase ({{{}IncrementalSourceReader{}}} / 
{{{}OracleConnectionUtils{}}}):* In pure-stream modes, {{StreamSplit}} carries 
empty {{{}tableSchemas{}}}, so 
{{IncrementalSourceReader.discoverTableSchemasForStreamSplit}} invokes 
{{{}OracleConnectionUtils.listTables{}}}. It queries {{ALL_TABLES}} and builds 
{{{}TableId{}}}s in Oracle's canonical upper case (e.g. 
{{{}DEBEZIUM.PRODUCTS{}}}).
 # Debezium's {{tableFilters.dataCollectionFilter().isIncluded(tableId)}} is 
case-sensitive. Since {{DEBEZIUM.PRODUCTS}} does not match 
{{{}debezium.products{}}}, zero tables are captured, {{registerHistory}} writes 
an empty collection, and {{HistorizedRelationalDatabaseSchema.recover()}} 
throws the exception above.

({{{}initial{}}} and {{snapshot}} modes are unaffected because schema history 
is populated from snapshot splits.)

> [Oracle CDC] Pure-stream startup fails with "db history topic is missing" due 
> to table name case mismatch in Oracle Pipeline connector
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-41777
>                 URL: https://issues.apache.org/jira/browse/FLINK-41777
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>    Affects Versions: cdc-3.6.0, cdc-3.7.0
>            Reporter: Xin Chen
>            Priority: Major
>
> Describe the bug
> When starting an Oracle CDC Pipeline job in pure-stream startup modes (e.g., 
> `latest-offset`, `timestamp`, `specific-offsets`), the TaskManager fails 
> immediately with:
> {code:java}
> io.debezium.DebeziumException: The db history topic or its content is fully 
> or partially missing. Please check database history topic configuration and 
> re-execute the snapshot.{code}
>  



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to