The db history topic or its content is fully or partially missing. Please check database history topic configuration and re-execute the snapshot.
The db history topic or its content is fully or partially missing The db history topic or its content is fully or partially missing. Please check database history topic configuration and re-execute the snapshot.
Environment :
- Flink version : 1.16.0
- Flink CDC version: 2.3.0
- Database and version: oracle19c
flink-sql CREATE TABLE SOURCE_PHOTO_TEST1 ( USERID STRING, USERNAME STRING, REALNAME STRING, ENNAME STRING, PRIMARY KEY(USERID) NOT ENFORCED ) WITH ( 'connector' = 'oracle-cdc', 'hostname' = '127.0.0.1', 'port' = '1521', 'username' = 'C##FLINKUSER', 'password' = 'flinkpw', 'database-name' = 'ORCL', 'debezium.database.pdb.name' = 'ORCLPDB', 'schema-name' = 'FLINK1', 'table-name' = 'SOURCE_PHOTO_TEST', 'debezium.log.mining.strategy' = 'online_catalog', 'scan.incremental.snapshot.enabled' = 'true', 'scan.startup.mode' = 'initial' );
Exception log 2022-11-13 16:06:12,227 WARN io.debezium.relational.history.DatabaseHistoryMetrics [] - Unable to register the MBean 'debezium.oracle:type=connector-metrics,context=schema-history,server=oracle_logminer': debezium.oracle:type=connector-metrics,context=schema-history,server=oracle_logminer 2022-11-13 16:06:12,228 ERROR org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager [] - Received uncaught exception. java.lang.RuntimeException: SplitFetcher thread 0 received unexpected exception while polling the records at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:150) ~[flink-connector-files-1.16.0.jar:1.16.0] at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:105) [flink-connector-files-1.16.0.jar:1.16.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_221] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_221] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_221] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_221] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221] Caused by: 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. at io.debezium.relational.HistorizedRelationalDatabaseSchema.recover(HistorizedRelationalDatabaseSchema.java:47) ~[flink-sql-connector-oracle-cdc-2.3.0.jar:2.3.0] at com.ververica.cdc.connectors.oracle.source.reader.fetch.OracleSourceFetchTaskContext.validateAndLoadDatabaseHistory(OracleSourceFetchTaskContext.java:229) ~[flink-sql-connector-oracle-cdc-2.3.0.jar:2.3.0] at com.ververica.cdc.connectors.oracle.source.reader.fetch.OracleSourceFetchTaskContext.configure(OracleSourceFetchTaskContext.java:105) ~[flink-sql-connector-oracle-cdc-2.3.0.jar:2.3.0] at com.ververica.cdc.connectors.base.source.reader.external.IncrementalSourceStreamFetcher.submitTask(IncrementalSourceStreamFetcher.java:81) ~[flink-sql-connector-oracle-cdc-2.3.0.jar:2.3.0] at com.ververica.cdc.connectors.base.source.reader.IncrementalSourceSplitReader.checkSplitOrStartNext(IncrementalSourceSplitReader.java:138) ~[flink-sql-connector-oracle-cdc-2.3.0.jar:2.3.0] at com.ververica.cdc.connectors.base.source.reader.IncrementalSourceSplitReader.fetch(IncrementalSourceSplitReader.java:70) ~[flink-sql-connector-oracle-cdc-2.3.0.jar:2.3.0] at org.apache.flink.connector.base.source.reader.fetcher.FetchTask.run(FetchTask.java:58) ~[flink-connector-files-1.16.0.jar:1.16.0] at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:142) ~[flink-connector-files-1.16.0.jar:1.16.0] ... 6 more 2022-11-13 16:06:12,228 INFO com.ververica.cdc.connectors.base.source.reader.IncrementalSourceSplitReader [] - Close current fetcher com.ververica.cdc.connectors.base.source.reader.external.IncrementalSourceStreamFetcher 2022-11-13 16:06:12,228 WARN com.ververica.cdc.connectors.base.source.reader.external.IncrementalSourceStreamFetcher [] - Failed to close the stream fetcher in 30 seconds.
I've encountered the same problem (almost the same Environment except for flink 1.15.3). For me the root of it is that connections that are used in IncrementalSource are not set to PDB, so IncrementalSource.createEnumerator:139 cannot discover the table required. If you fix that then you'll start getting "ORA-00942: table or view does not exist" all over the place (for the same reason that connections aren't set to PDB)
I also faced this problem with following env:
- Flink 1.15.3 & 1.15.2
- FlinkCDC 2.3.0
- Oracle 11g
@JuchangGit @caiiiookk @leonardBang
I tried to track the source code and runs well* after hiding one line indicates here: Github-url : schema.recover(offset); ➡️ // schema.recover(offset);
I thought the oracle-history-manager might be unconsidered in FlinkCDC. However, I'm not familiar with either Debezium or FlinkCDC, so this issue should still be examined by a professional before V2.4.0.
We can change and rebuild the source code ourselves for production convenience. 😃
@leonardBang 求大佬修复
Having the same problem with evn oracle19c& oracle 12c,but oracle 11g is normal。 Environment: Flink version : 1.15.0 Flink CDC version: 2.3.0 Database and version: oracle19c & oracle 12c。
@leonardBang 求大佬修复
I will take a look this issue.
请问大佬修复此问题了吗,是不是因为oracle某个表是分区表导致的这个问题实时增量抽取不了
就是分区表不行,后来通过源码修复,分区表可以了,但是还有其他很多问题,最后我们觉得Flink oracle CDC没有达到生产环境可用的成熟度。
就是分区表不行,后来通过源码修复,分区表可以了,但是还有其他很多问题,最后我们觉得Flink oracle CDC没有达到生产环境可用的成熟度。
@Powww 你好,我提供一个基于dbz版本是1.9.7 的jar,帮忙验证下。
@GOODBOY008 你好,我们使用oracle-cdc 也遇到了这个问题,请问是否有解决的办法呢
就是分区表不行,后来通过源码修复,分区表可以了,但是还有其他很多问题,最后我们觉得Flink oracle CDC没有达到生产环境可用的成熟度。
@Powww 请问是如何修复的呢,我们也发现分区表会报这个错误
@leonardBang @ruanhang1993 大佬,这个bug还修复吗?我看已经从V2.4.0中移除了。。
It seems like the problem still exists and not fixed by the update of debezium version. Move this to 2.5.0.
这个bug在2.4.1仍然存在,请问如何处理
i also meet this problem, give one useful solution: because of i create a table in orcacle APEX database, when begin to run oracle cdc, its will runtimeExcetion:
Caused by: org.apache.inlong.sort.cdc.oracle.shaded.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.
later, i change create my table in my self oracle database, it's woker well.
and i find that APEX_030200 is the APEX product database user. maybe this database is something specials
https://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/217843.htm
2.4.1 还是有这个问题, @GOODBOY008 有空看看吗?
2.4.1 还是有这个问题, @GOODBOY008 有空看看吗? @melin If your table is partitioned , you can use this pr https://github.com/ververica/flink-cdc-connectors/pull/2479.
2.4.1 还是有这个问题, @GOODBOY008 有空看看吗? @melin If your table is partitioned , you can use this pr https://github.com/ververica/flink-cdc-connectors/pull/2479.
我的测试表不是分区表,这个改动,应该解决不了我遇到的问题。我直接查询sql,能够找到我同步的表:
2.4.1 还是有这个问题, @GOODBOY008 有空看看吗? @melin If your table is partitioned , you can use this pr https://github.com/ververica/flink-cdc-connectors/pull/2479.
我的测试表不是分区表,这个改动,应该解决不了我遇到的问题。我直接查询sql,能够找到我同步的表:
Your oracle running model is cdb or nocdb ? Currently., cdb model is not support with cdc Incremental model.
Oracle 版本比较低,应该是Non-CDB,CDB 是12 版本后引入的 DBMS: Oracle (ver. Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production) Case sensitivity: plain=upper, delimited=exact
