Debezium does not update scn in the offset topic
- Dominant language
- HTML
- Stars
- 6
- Forks
- 8
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
## Bug report
**What Debezium connector do you use and what version?**
`debezium oracle 3.6.1`
---
**What is the connector configuration?**
> {
> "connector.class": "io.debezium.connector.oracle.OracleConnector",
> "database.query.timeout.ms": "0",
> "query.fetch.size": "10000",
> "schema.history.internal.consumer.sasl.jaas.config": "${secrets:draak/debezium-connect-user:sasl.jaas.config}",
> "heartbeat.action.query": "UPDATE P1QMS.QMS_DEBEZIUM_HEARTBEAT SET BEAT = SYS_EXTRACT_UTC(SYSTIMESTAMP)",
> "schema.history.internal.producer.security.protocol": "SASL_SSL",
> "schema.history.internal.producer.ssl.truststore.password": "${secrets:draak/draak-cluster-ca-cert:ca.password}",
> "heartbeat.topics.prefix": "__debezium-heartbeat",
> "key.converter": "org.apache.kafka.connect.json.JsonConverter",
> "schema.history.internal.producer.sasl.mechanism": "SCRAM-SHA-512",
> "database.dbname": "pecboff3",
> "database.user": "${secrets:draak/debezium-oracle-credentials:dbz_user}",
> "heartbeat.interval.ms": "300000",
> "schema.history.internal.kafka.bootstrap.servers": "${env:KAFKA_CONNECT_BOOTSTRAP_SERVERS}",
> "schema.history.internal.skip.unparseable.ddl": "true",
> "legacy.decimal.handling.strategy": "true",
> "key.converter.schemas.enable": "false",
> "value.converter.schema.registry.url": "http://schema-registry.xxxxxxx.prd.k8s.xxxxxxxxxxxx”x,
> "database.password": "${secrets:draak/debezium-oracle-credentials:dbz_password}",
> "value.converter.schemas.enable": "false",
> "name": "debezium-prd3-boff-source",
> "schema.history.internal.consumer.sasl.mechanism": "SCRAM-SHA-512",
> "schema.history.internal.consumer.ssl.truststore.type": "PKCS12",
> "schema.history.internal.producer.sasl.jaas.config": "${secrets:draak/debezium-connect-user:sasl.jaas.config}",
> "max.batch.size": "20480",
> "snapshot.mode": "no_data",
> "schema.history.internal.consumer.security.protocol": "SASL_SSL",
> "max.queue.size": "81290",
> "incremental.snapshot.chunk.size": "10000",
> "tasks.max": "1",
> **"log.mining.transaction.retention.ms": "18000000",**
> **"log.mining.strategy": "redo_log_catalog",**
> "schema.history.internal.store.only.captured.tables.ddl": "true",
> "tombstones.on.delete": "false",
> "topic.prefix": "PRD3.BOFF",
> "decimal.handling.mode": "string",
> "schema.history.internal.consumer.ssl.truststore.location": "/opt/kafka/external-configuration/cluster-ca-cert/ca.p12",
> "schema.history.internal.kafka.topic": "prd3.boff.history-changes",
> "value.converter": "io.confluent.connect.avro.AvroConverter",
> "database.connection.adapter": "logminer",
> "database.url": "${secrets:draak/debezium-oracle-credentials:boff_url}",
> "schema.history.internal.consumer.ssl.truststore.password": "${secrets:draak/draak-cluster-ca-cert:ca.password}",
> "schema.history.internal.producer.ssl.truststore.type": "PKCS12",
> "schema.name.adjustment.mode": "avro",
> "log.mining.log.count.min": "50",
> "schema.history.internal.producer.ssl.truststore.location": "/opt/kafka/external-configuration/cluster-ca-cert/ca.p12",
> "table.include.list": “table list”
> }
>
---
**What is the captured database version and mode of deployment?**
_E.g. on-premises, with a specific cloud provider, etc._
`Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production`
---
**What behavior do you expect?**
`Debezium connector will update scn`
---
**What behavior do you see?**
`
after the incident with [DML parsing error](https://github.com/debezium/dbz/issues/2456)
we had to switch from hybrid to redo_log_catalog strategy
We got this issue after DB release at night **2026-08-15 23:00**
Connector was switched to redo_log_catalog strategy only *2026-08-18 20:00**
We have 5-6 days of the archive logs history, so this should not be a problem
But after some time of the monitoring I realised that connector does not update scn field on offset topic for this specific connector
> {
> "commit_scn": "7969440933687:1:1e002100e460b804", - this one was regulary updated
> "txSeq": 19,
> "txId": "06000300595c4704",
> "snapshot_scn": "7957748961968",
> "scn": "7968658748462" - remain always the same, pointing to **2026-08-15 23:00**
> }
> -- commit_scn
> SELECT SCN_TO_TIMESTAMP(7969440933687) FROM dual;
> -- 2026-08-20 04:42:46.000000000
> --scn
> SELECT SCN_TO_TIMESTAMP(7968658748462) FROM dual;
> -- 2026-08-15 23:00:51.000000000
>
Could you please explain why "scn": "7968658748462" always stay the same?
We have **"log.mining.transaction.retention.ms": "18000000",** - 5 hours to keep active transaction
So my undestanding the **scn** should also be updated not only **commit_scn**
Now connector is down because wants to start logminer session from 7968658748462 which is no longer available (6 days ago)
> io.debezium.DebeziumException: The connector is trying to read change stream starting at OracleOffsetContext [scn=7968658748462, txId=19000b007209c704, txSeq=22, commit_scn=["7969458461417:1:190021005303c904"], lcr_position=null], but this is no longer available on the server. Reconfigure the connector to use a snapshot mode when needed.
> at io.debezium.connector.common.BaseSourceTask.validateSchemaHistory(BaseSourceTask.java:164)
> at io.debezium.connector.oracle.OracleConnectorTask.start(OracleConnectorTask.java:153)
> at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:285)
> at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:226)
> at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
> at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:243)
> 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)
`
---
**Do you see the same behaviour using the latest released Debezium version?**
_Ideally, also verify with the latest Alpha/Beta/CR version._
`yes, I use latest stable 3.6.1`
---
**Do you have the connector logs, ideally from start till finish?**
_You might be asked later to provide [DEBUG/TRACE](https://debezium.io/documentation/reference/stable/operations/logging.html) level log._
`unfortunatelly only INFO level is enabled
---
**How to reproduce the issue using our [tutorial](https://github.com/debezium/debezium-examples/tree/main/tutorial) deployment?**
`
Start connector with offset config pointing in time to 2-3 days ago
`
Contributor guide
Assessment
This issue has not been assessed yet.