apache/seatunnel · info

MySQL-CDC diagnostic: variable {}={}

Error message

MySQL-CDC diagnostic: variable {}={}

What it means

Diagnostic WARN from logMySqlVariable logging the successful lookup of a MySQL system variable: variable name and value (e.g. binlog_expire_logs_seconds=259200). It is part of the binlog-retention diagnostics printed when binlog/GTID availability checks fail, showing how long binlogs are retained on the server.

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:500

    private void logMySqlBinlogRetentionVariables() {
        logMySqlVariable("log_bin");
        logMySqlVariable("binlog_format");
        logMySqlVariable("binlog_expire_logs_seconds");
        logMySqlVariable("expire_logs_days");
    }

    private void logMySqlVariable(String variableName) {
        final String sql = String.format("SHOW VARIABLES LIKE '%s'", variableName);
        try {
            connection.query(
                    sql,
                    rs -> {
                        if (!rs.next()) {
                            LOG.warn("MySQL-CDC diagnostic: variable {} not found", variableName);
                            return;
                        }
                        LOG.warn(
                                "MySQL-CDC diagnostic: variable {}={}",
                                rs.getString(1),
                                rs.getString(2));
                    });
        } catch (SQLException e) {
            LOG.warn(
                    "MySQL-CDC diagnostic: failed to query variable {}: {}",
                    variableName,
                    e.getMessage());
        }
    }

    private void logMySqlMasterStatus() {
        try {
            connection.query(
                    "SHOW MASTER STATUS",
                    rs -> {
                        if (!rs.next()) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Compare the logged value with the binlog file/position of the restored offset; increase retention (SET PERSIST binlog_expire_logs_seconds=...) if binlogs are purged too fast
  2. Use the value with logBinlogRangeAnalysis output to confirm the required binlog still exists
  3. No code change needed — this is informational

Example fix

// before
SET PERSIST binlog_expire_logs_seconds = 86400;
// after
SET PERSIST binlog_expire_logs_seconds = 604800;
Defensive patterns

Strategy: validation

Validate before calling

SHOW VARIABLES LIKE 'binlog_expire_logs_seconds';
SHOW VARIABLES LIKE 'expire_logs_days';
-- compare retention with checkpoint binlog file age

Prevention

When it happens

Trigger: Called from logMySqlBinlogRetentionVariables via logMySqlVariable whenever SHOW VARIABLES LIKE '<retention variable>' returns a row during a binlog/GTID diagnostic run.

Common situations: Interpreting restart failures: a very small retention value explains why required binlog files were purged.

Understand the failure class

Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.

Related errors


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