Hi all,
I’m seeing a discrepancy in total record counts when combining Full Load and CDC using Debezium Oracle 3.2.0 with AWS MSK.
Details:
Oracle version: 19c
Snapshot mode: initial/incremental/blocking
Table receives changes during full load
Full load matches source count at SCN, but after CDC, total records (full load + CDC) don’t match
It seems some changes during full load might be lost
Questions:
Could changes during full load be skipped in CDC?
Are there log mining / SCN gap settings to prevent missing records?
Does internal.log.mining.read.only=true risk missing changes?
Any recommended practices to ensure full load + CDC consistency?
Thanks in advance for advice or example configs!
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/debezium/43afddb9-103c-41ab-9029-fd97070610e7n%40googlegroups.com.
Hello! Thanks for the suggestion. I tried running a blocking snapshot, but after it completed I found that the total number of records does not match the source table. The snapshot produced fewer records than expected.
This setup is running on AWS MSK, and before starting the snapshot I upgraded Debezium to 3.2.5.Final, but the issue still occurred.
Could this be caused by the connector configuration?
Here are my current settings:
{
"connector.class": "io.debezium.connector.oracle.OracleConnector",
"database.hostname": "----",
"database.port": "----",
"database.user": "----",
"database.password": "----",
"database.dbname": "----",
"database.connection.adapter": "logminer",
"table.include.list": "
BD.SCHEMANM.DEBEZIUM_SIGNAL, ----",
"tasks.max": "1",
"snapshot.mode": "initial",
"snapshot.fetch.size": "20000",
"incremental.snapshot.chunk.size": "150000",
"internal.log.mining.read.only": "true",
"log.mining.transaction.retention.ms": "600000",
"include.transaction.details": "true",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": "true",
"value.converter.ignore.default.for.nullables": "true",
"value.converter.replace.null.with.default": "false",
"key.converter.replace.null.with.default": "false",
"decimal.handling.mode": "string",
"tombstones.on.delete": "false",
"transforms": "changes,route",
"transforms.changes.type": "io.debezium.transforms.ExtractChangedRecordState",
"transforms.changes.header.changed.name": "Changed",
"transforms.route.type": "io.debezium.transforms.ContentBasedRouter",
"transforms.route.language": "jsr223.groovy",
"transforms.route.topic.expression": "topic.startsWith('BD.SCHEMANM.') && value?.op != null && value.op != 'r' ? topic + '_cdc' : topic",
"heartbeat.interval.ms": "5000",
"heartbeat.topics.prefix": "debezium-heartbeat",
"signal.data.collection": "
BD.SCHEMANM.DEBEZIUM_SIGNAL",
"signal.enabled.channels": "source,kafka",
"notification.enabled.channels": "sink",
"signal.kafka.bootstrap.servers": "----",
"signal.kafka.topic": "kafka_debezium_signal",
"schema.history.internal.kafka.bootstrap.servers": "----",
"schema.history.internal.kafka.topic": "bdddl",
"schema.history.internal.producer.security.protocol": "SASL_SSL",
"schema.history.internal.consumer.security.protocol": "SASL_SSL",
"signal.consumer.security.protocol": "SASL_SSL",
"schema.history.internal.consumer.sasl.mechanism": "AWS_MSK_IAM",
"schema.history.internal.producer.sasl.mechanism": "AWS_MSK_IAM",
"signal.consumer.sasl.mechanism": "AWS_MSK_IAM",
"signal.consumer.sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required;",
"schema.history.internal.consumer.sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required;",
"schema.history.internal.producer.sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required;",
"signal.consumer.sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler",
"schema.history.internal.consumer.sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler",
"schema.history.internal.producer.sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler",
"connect.timeout.ms": "60000",
"request.timeout.ms": "30000",
"creation.default.partitions": "3",
"metrics.jmx.enabled": "false"
}
To view this discussion visit https://groups.google.com/d/msgid/debezium/4af88a7b-5b84-42ba-a93a-fa7aa778af88n%40googlegroups.com.
Hi,
I'm not sure yet. I will try to determine.
I also wanted to clarify one more thing.
Could the following configuration option cause row-count mismatches when using a primary (non-standby) Oracle database?
I’m wondering whether this setting might affect LogMiner behavior or lead to missed changes during the snapshot or CDC phase.
Thanks!
To view this discussion visit https://groups.google.com/d/msgid/debezium/44084535-c459-4100-b4fc-f9913698ff59n%40googlegroups.com.
Thanks for the clarification. I'll look into how to enable TRACE logging and will try to collect the logs and identify the missing row(s) by their primary key.
One more question: since I'm running the connector on AWS MSK Connect, is there anything specific I should keep in mind when enabling TRACE logging in that environment?
Thanks!
To view this discussion visit https://groups.google.com/d/msgid/debezium/2f9ab0ea-51c9-4260-9ad2-d6a93ec6d454n%40googlegroups.com.
I’m still working on enabling TRACE logging for io.debezium — in AWS MSK Connect this is turning out to be more complicated than I expected.
However, I can already share some findings from my initial analysis.
I triggered a blocking snapshot, and the final result contained fewer records than expected (full load + CDC).
After verifying the data in detail, I found the following:
The full load at the assigned SCN completed successfully, and the record count fully matched the source table.
There was a ~5-minute gap between the last snapshot record and the first CDC record (based on creation timestamps in the database).
All changes that occurred during this period did not appear in CDC.
I also noticed that some CDC events are missing later as well, so the issue is not limited to the snapshot–CDC transition.
The connector is replicating about 60 tables, so the workload is quite significant.
So my question is:
Could these missing CDC events be caused by insufficient resources allocated to the MSK Connect worker running the Debezium connector?
To view this discussion visit https://groups.google.com/d/msgid/debezium/c2f945f6-061c-45f9-b696-1465cf973935n%40googlegroups.com.