icchux commented on issue #13371:
URL: https://github.com/apache/seatunnel/issues/13371#issuecomment-7185945686
Follow-up: switching to `startup.mode = "latest"` is also blocked in the
same deployment, but by a separate GTID compatibility failure rather than the
`SHOW MASTER LOGS` syntax error.
### Environment and latest run
- SeaTunnel 3.1.0, OceanBase-CDC, Zeta via REST V2, Java 17.
- `SELECT VERSION()`: `5.7.25-OceanBase_CE-v4.2.4.0`.
- Rechecked the current failed run in STX: November 26, 2026,
15:47:54–15:48:25 (Asia/Shanghai); approximately 30 seconds, with read_count =
0 and write_count = 0.
- The submitted script contains the following startup settings (connection
details and business tables omitted):
```hocon
OceanBase-CDC {
startup.mode = "latest"
startup.timestamp = 1795536000000
}
```
The timestamp option is a leftover in the actual submitted configuration; I
am including it for reproducibility. The exception below is in starting-offset
GTID validation, not timestamp-to-binlog lookup.
### Error from the current job
STX's job error panel contains the following causal stack. Its expanded log
viewer reports zero log lines; the separate final metrics panel reports zero
records read/written.
```text
java.lang.RuntimeException: One or more fetchers have encountered exception
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcherManager.checkErrors(SplitFetcherManager.java:147)
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.SourceReaderBase.getNextFetch(SourceReaderBase.java:167)
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:93)
at
org.apache.seatunnel.connectors.cdc.base.source.reader.IncrementalSourceReader.pollNext(IncrementalSourceReader.java:130)
...
Caused by: java.lang.RuntimeException: SplitFetcher thread 0 received
unexpected exception while polling the records
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165)
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:81)
...
Caused by: java.lang.NullPointerException: Cannot invoke
"String.replaceAll(String, String)" because "gtids" is null
at io.debezium.connector.mysql.GtidSet.<init>(GtidSet.java:49)
at
io.debezium.connector.mysql.MySqlConnection.lambda$subtractGtidSet$6(MySqlConnection.java:317)
at
io.debezium.jdbc.JdbcConnection.prepareQueryAndMap(JdbcConnection.java:752)
at
io.debezium.connector.mysql.MySqlConnection.subtractGtidSet(MySqlConnection.java:309)
at
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.reader.fetch.MySqlSourceFetchTaskContext.checkGtidSet(MySqlSourceFetchTaskContext.java:397)
at
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.reader.fetch.MySqlSourceFetchTaskContext.isBinlogAvailable(MySqlSourceFetchTaskContext.java:328)
at
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.reader.fetch.MySqlSourceFetchTaskContext.loadStartingOffsetState(MySqlSourceFetchTaskContext.java:292)
at
org.apache.seatunnel.connectors.seatunnel.cdc.mysql.source.reader.fetch.MySqlSourceFetchTaskContext.configure(MySqlSourceFetchTaskContext.java:135)
at
org.apache.seatunnel.connectors.cdc.base.source.reader.external.IncrementalSourceStreamFetcher.submitTask(IncrementalSourceStreamFetcher.java:110)
at
org.apache.seatunnel.connectors.cdc.base.source.reader.IncrementalSourceSplitReader.checkSplitOrStartNext(IncrementalSourceSplitReader.java:186)
at
org.apache.seatunnel.connectors.cdc.base.source.reader.IncrementalSourceSplitReader.fetch(IncrementalSourceSplitReader.java:84)
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.FetchTask.run(FetchTask.java:54)
at
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:162)
... 6 more
```
### SQL reproduction
The following tests were run manually against the job's endpoint/account,
using a synthetic UUID:
```sql
SELECT GTID_SUBTRACT(
'00000000-0000-0000-0000-000000000001:1-10',
'00000000-0000-0000-0000-000000000001:1-10'
) AS same_set_diff;
-- Actual: one row containing SQL NULL
-- Expected MySQL semantics: empty string
SELECT GTID_SUBTRACT(
'00000000-0000-0000-0000-000000000001:1-10',
'00000000-0000-0000-0000-000000000001:1-5'
) AS remaining_diff;
-- Actual: one row containing SQL NULL
-- Expected MySQL semantics: 00000000-0000-0000-0000-000000000001:6-10
```
In [MySqlConnection.subtractGtidSet() in
3.1.0](https://github.com/apache/seatunnel/blob/3.1.0/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java#L307-L325),
the result of `SELECT GTID_SUBTRACT(?, ?)` is passed directly to `new
GtidSet(rs.getString(1))`. A returned SQL NULL therefore matches the NPE above.
The caller is
[checkGtidSet()](https://github.com/apache/seatunnel/blob/3.1.0/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java#L325-L415).
This is not only an empty-set representation difference: the nonempty
subtraction test also returns NULL. Treating NULL unconditionally as an empty
GTID set could incorrectly pass transaction-availability checks. Any fallback
would need to preserve GTID subtraction semantics and validate the subsequent
binlog-read path; otherwise an explicit compatibility error would be safer than
silently accepting the result.
I have not deployed/tested PR #13382, so this is not a claim that the
proposed file-listing fix failed. The exact OceanBase Binlog Service version is
still unconfirmed, and these observations apply to this deployment. Should this
GTID compatibility failure be tracked in a separate issue? I am adding it here
because `latest` currently cannot serve as a workaround for the
timestamp-startup issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]