apache/seatunnel · info

MySQL-CDC diagnostic

Error message

MySQL-CDC diagnostic: {} status {}

What it means

This is the success branch of the same diagnostic: the connector successfully read MySQL replication status (e.g. SHOW SLAVE/REPLICA STATUS or SHOW MASTER STATUS) and logs the collected key=value pairs at WARN level to make them visible in logs. It is not a failure; it is a deliberately loud diagnostic dump used when binlog positioning problems are suspected.

Solutions

  1. Nothing to fix — treat the logged key=value pairs as diagnostic data.
  2. Use the logged values (e.g. executed_gtid_set, master_log_file/pos) to correlate with the connector's required offset.
  3. Lower log noise in normal operation by not enabling diagnostic mode unless troubleshooting.
Defensive patterns

Strategy: validation

Validate before calling

SHOW MASTER STATUS; SHOW REPLICA STATUS; -- confirm outputs match the logged diagnostic row

Prevention

When it happens

Trigger: logMySqlReplicationStatus triggers logReplicationStatus, the status SQL executes without SQLException, and at least one status column was non-empty, producing a joined row like 'slave_io_running=Yes, executed_gtid_set=...'

Common situations: Engineers enabling/inspecting MySQL-CDC diagnostics while troubleshooting 'binlog not available' or offset-restore failures; the WARN level is intentional so the snapshot appears alongside the failure investigation.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/4ab852e52c25e324. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java:593

                        String executedGtidSet = safeGetString(rs, "Executed_Gtid_Set");

                        row.add("source_host=" + sourceHost);
                        row.add("io_running=" + ioRunning);
                        row.add("sql_running=" + sqlRunning);
                        row.add("relay_master_log_file=" + relayMasterLogFile);
                        row.add("exec_master_log_pos=" + execMasterLogPos);
                        if (retrievedGtidSet != null) {
                            row.add("retrieved_gtid_set=" + retrievedGtidSet);
                        }
                        if (executedGtidSet != null) {
                            row.add("executed_gtid_set=" + executedGtidSet);
                        }
                    });
            if (row.isEmpty()) {
                LOG.warn("MySQL-CDC diagnostic: {} status empty/unsupported", label);
                return true;
            }
            LOG.warn("MySQL-CDC diagnostic: {} status {}", label, String.join(", ", row));
            return true;
        } catch (SQLException e) {
            LOG.warn("MySQL-CDC diagnostic: {} failed: {}", sql, e.getMessage());
            return false;
        }
    }

    private void logBinlogRangeAnalysis(
            String requiredBinlogFilename, List<String> availableBinlogFiles) {
        BinlogFileNumber required = parseBinlogFileNumber(requiredBinlogFilename);
        if (required == null) {
            return;
        }

        long min = Long.MAX_VALUE;
        long max = Long.MIN_VALUE;
        boolean any = false;
        for (String file : availableBinlogFiles) {

View on GitHub (pinned to cf67b549a7)