airbytehq / airbytehq/airbyte

[source-mysql] MySQL CDC GTID validation can fail with "other is null"

Open
#75,558 6 comments 0 reactions 0 assignees View on GitHub
area/connectors autoteam community connectors/source/mysql needs-triage team/extensibility team/use type/bug
Dominant language
Python
Stars
22.1k
Forks
5.3k
PR merge metrics
PR metrics pending

Description

### Connector Name

source-mysql

### Connector Version

3.51.5

### What step the error happened?

During the sync

### Relevant information

We observed MySQL CDC failures with the following error:

- `Incumbent CDC state is invalid`
- `java.lang.NullPointerException`
- `Cannot invoke "io.debezium.connector.mysql.gtid.MySqlGtidSet$UUIDSet.getUUID()" because "other" is null`

This came up while validating CDC against a restored MySQL instance used for staging/testing.

Related discussion:
- https://github.com/airbytehq/airbyte/discussions/74305

Upstream Debezium context:
- https://github.com/debezium/debezium/pull/6894
- https://github.com/debezium/debezium/commit/84206138cdb1983a33623f31517e2caea5d16c35

Findings from investigation:

1. The Bulk Extract CDC toolkit still depended on Debezium `3.1.2.Final`.
2. In local validation, moving that dependency line to Debezium `3.4.2.Final` removed the GTID null-handling failure
path.
3. While validating that change, we found that `source-mysql` was still pinned to Bulk CDK `0.1.77`, and the current
connector sources on `master` no longer compile cleanly against that stale published artifact.
4. `source-mysql` also still used the deprecated Jackson API `ObjectNode.fields()`, which fails under Kotlin `-Werror`.

This needs to be addressed in two follow-up PRs:
- one PR for the Bulk Extract CDC toolkit Debezium bump
- one PR for `source-mysql` Bulk CDK alignment and deprecated Jackson API cleanup

### Relevant log output

```shell
2026-03-27 15:14:01 source ERROR main i.a.c.AirbyteConnectorRunnable(run):38 Failed class io.airbyte.cdk.read.ReadOperation operation execution. io.airbyte.cdk.ConfigErrorException: Incumbent CDC state is invalid, reason: java.lang.NullPointerException: Cannot invoke "io.debezium.connector.mysql.gtid.MySqlGtidSet$UUIDSet.getUUID()" because "other" is null
at io.airbyte.cdk.read.cdc.CdcPartitionsCreator.run(CdcPartitionsCreator.kt:85) ~[bulk-cdk-toolkit-extract-cdc-0.1.77.jar:?]
at io.airbyte.cdk.read.FeedReader.createPartitionsWithResources(FeedReader.kt:148) ~[bulk-cdk-core-extract-0.1.77.jar:?]
at io.airbyte.cdk.read.FeedReader.access$createPartitionsWithResources(FeedReader.kt:35) ~[bulk-cdk-core-extract-0.1.77.jar:?]
at io.airbyte.cdk.read.FeedReader$createPartitions$3.invokeSuspend(FeedReader.kt:121) ~[bulk-cdk-core-extract-0.1.77.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-2.1.10.jar:2.1.10-release-473]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:?]

Stack Trace: io.airbyte.cdk.ConfigErrorException: Incumbent CDC state is invalid, reason: java.lang.NullPointerException: Cannot invoke "io.debezium.connector.mysql.gtid.MySqlGtidSet$UUIDSet.getUUID()" because "other" is null
at io.airbyte.cdk.read.cdc.CdcPartitionsCreator.run(CdcPartitionsCreator.kt:85)
at io.airbyte.cdk.read.FeedReader.createPartitionsWithResources(FeedReader.kt:148)
at io.airbyte.cdk.read.FeedReader.access$createPartitionsWithResources(FeedReader.kt:35)
at io.airbyte.cdk.read.FeedReader$createPartitions$3.invokeSuspend(FeedReader.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
```

### Contribute

- [x] Yes, I want to contribute

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11532

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.