Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-4953

Oracle truncate causes exception

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      1) Create a table in Oracle and insert some values, for example:

      CREATE TABLE TEST_TABLE (pk int primary key, col2 varchar2(100));
      ALTER TABLE TEST_TABLE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
      INSERT INTO TEST_TABLE VALUES (1, 'test');

      2) Start Debezium and capture this new table, wait for the snapshot to finish.

      3) Truncate the table:

      TRUNCATE TABLE TEST_TABLE;
      
      Show
      1) Create a table in Oracle and insert some values, for example: CREATE TABLE TEST_TABLE (pk int primary key, col2 varchar2(100)); ALTER TABLE TEST_TABLE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS; INSERT INTO TEST_TABLE VALUES (1, 'test' ); 2) Start Debezium and capture this new table, wait for the snapshot to finish. 3) Truncate the table: TRUNCATE TABLE TEST_TABLE;

      Hi,

      We noticed that an Oracle truncate event causes an exception in the connector. We are running this through DebeziumEngine and have not tested this through a regular connector. This issue started since version 1.8.1.Final, in 1.8.0 truncate was still working.

      2022-04-05 08:21:25,189 ERROR [io.deb.con.ora.log.LogMinerHelper] (debezium-oracleconnector-default.repl1-zhirxm--1-change-event-source-coordinator) Mining session stopped due to the {}: io.debezium.DebeziumException: Field values corrupt for DDL DmlEvent{dmlEntry={LogMinerDmlEntryImpl={eventType=DDL,newColumns=[Ljava.lang.Object;@6b63558b,oldColumns=[Ljava.lang.Object;@7d513ff}} LogMinerEvent{eventType=DDL, scn=56574780, tableId=ORCLPDB1.DEBEZIUM.TEST_TABLE, rowId='AAAAAAAAAAAAAAAAAB', rsId= 0x0011d6.0004bb4b.00fc , changeTime=2022-04-05T08:21:11Z}
       at io.debezium.connector.oracle.logminer.processor.TransactionCommitConsumer.rowIdFromEvent(TransactionCommitConsumer.java:259)
       at io.debezium.connector.oracle.logminer.processor.TransactionCommitConsumer.acceptDmlEvent(TransactionCommitConsumer.java:125)
       at io.debezium.connector.oracle.logminer.processor.TransactionCommitConsumer.accept(TransactionCommitConsumer.java:109)
       at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.handleCommit(AbstractLogMinerEventProcessor.java:428)
       at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processRow(AbstractLogMinerEventProcessor.java:272)
       at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processResults(AbstractLogMinerEventProcessor.java:242)
       at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.process(AbstractLogMinerEventProcessor.java:188)
       at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:183)
       at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:57)
       at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:174)
       at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:141)
       at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:109)
       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
       at java.base/java.lang.Thread.run(Thread.java:833)
      

            ccranfor@redhat.com Chris Cranford
            robin-vanderstraeten-klarrio Robin Vanderstraeten (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: