Hi <@U04S8PLJWMT>, I want to open a bug report wit...
# ask-ai
f
Hi @kapa.ai, I want to open a bug report with the following content
Copy code
[Bug]: MySQL CDC: Record Duplication Due to Incorrect Offset Restart After Debezium Connector Failure (Error 1236)

**Airbyte Version:** 2.0.1
**Source Connector:** MySQL CDC (Debezium)
**Destination Connector:** BigQuery
**Sync Mode:** Change Data Capture (CDC)
**Target Write Schema:** Append

### :ladybug: Bug Description

When a MySQL CDC sync job (Run 1) fails *after* starting the data emission, the subsequent job (Run 2) incorrectly restarts from the **initial binlog offset of Run 1** instead of the last committed offset. This leads to the re-processing and re-writing of records already sent to the BigQuery destination, causing **data duplication** due to the **Append** write mode.

### Steps to Reproduce

1.  Configure a **MySQL CDC Source Connector** (Airbyte 2.0.1) syncing to a **BigQuery Destination** using the **Append** write mode.
2.  Start **Run 1** (sync) which successfully begins streaming from a specific position:
    ```log
    2025-11-30 11:46:50 source ERROR : Requesting streaming from position filename: db05-slave.087542, position: 87056536
3. Force Run 1 to fail shortly after it starts streaming, specifically triggering the Debezium/MySQL Error 1236 (replica ID conflict). * The failure log excerpt:
Copy code
log
        2025-11-30 11:46:56 source ERROR blc-db05-slave.bravofly.intra:3306 i.d.p.ErrorHandler(setProducerThrowable):52 Producer failure io.debezium.DebeziumException: A replica with the same server_uuid/server_id as this replica has connected to the source; the first event 'db05-slave.087542' at 87056536... Error code: 1236; SQLSTATE: HY000.
4. Verify that BigQuery received records before Run 1 terminated. 5. Correct the failure cause (e.g., resolve the server ID conflict) and start Run 2. 6. Observe the Run 2 log: The connector logs immediately confirm it is restarting from the exact same binlog position where Run 1 started (
db05-slave.087542, position=87056536
), demonstrating the incorrect offset retrieval: * Run 2 Log excerpt:
Copy code
log
        2025-11-30 12:11:19 source INFO DefaultDispatcher-worker-3#global-round-1-create-partitions i.a.c.r.c.CdcPartitionsCreator(run):144 Current position 'MySqlSourceCdcPosition(fileName=db05-slave.087542, position=87056536)' does not exceed target position 'MySqlSourceCdcPosition(fileName=db05-slave.087546, position=19566958)'.
7. Check the BigQuery table: the initial batch of records (those processed between Run 1 start and failure) is duplicated. ### Expected Behavior The subsequent job (Run 2) should resume from the last binlog offset that was successfully confirmed (committed state) by the BigQuery destination connector. This ensures that records already written to the target are not re-processed and duplicated.``` do you already have a similar bug reported for this behaviour?
k
I’m sorry, but the knowledge sources you provided don’t mention a bug specifically matching: - MySQL CDC with Debezium on Airbyte 2.0.1 - Destination BigQuery in Append mode - A Debezium Error 1236 (replica/server ID conflict) - Followed by the CDC sync restarting from the initial binlog offset of the failed run, causing duplicated records. The closest related items I can see are: - CDC snapshot/position issues and missing data or state changes in MySQL source versions around
3.9.x
, but not about duplication on restart after an Error 1236 failure.[[mysql big-table issue](https://github.com/airbytehq/airbyte/issues/48717)] - Various MySQL CDC binlog deserialization / EOF / Debezium errors and restart failures, but again, not about successfully restarting from an earlier offset and duplicating data in an append-only destination.[[mysql cdc EOF issue](https://github.com/airbytehq/airbyte/issues/51607); [append-only binlog error](https://github.com/airbytehq/airbyte/issues/50856)] - A forum case where an incremental+append BigQuery destination effectively re-ran from the start each time, but that was about CDC cursor selection / state not being applied, not this specific Debezium Error 1236 and offset rollback behavior.[[bigquery incremental append](https://discuss.airbyte.io/t/2127)] Given that, I cannot confirm from these sources that an identical bug (offset reset after Debezium Error 1236 causing duplication with Append mode) has already been reported. So, based on the available information: - There is no clearly matching existing bug report in the provided sources. - Your write‑up is detailed and reproducible; it would be reasonable to open a new GitHub issue with that content. If you open it, you might also cross‑link to the other MySQL CDC state/offset issues above as “possibly related,” but your scenario appears distinct enough to warrant its own report.
f
anyone interested I reported it here https://github.com/airbytehq/airbyte/issues/70254