{"record":{"id":"ef25c233c28b0403","repo":"apache/seatunnel","slug":"mysql-cdc-diagnostic-master-status-file-posit","errorCode":null,"errorMessage":"MySQL-CDC diagnostic: master status file={}, position={}, executed_gtid_set={}","messagePattern":"MySQL-CDC diagnostic: master status file=(.+?), position=(.+?), executed_gtid_set=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java","lineNumber":526,"sourceCode":"                    variableName,\n                    e.getMessage());\n        }\n    }\n\n    private void logMySqlMasterStatus() {\n        try {\n            connection.query(\n                    \"SHOW MASTER STATUS\",\n                    rs -> {\n                        if (!rs.next()) {\n                            LOG.warn(\n                                    \"MySQL-CDC diagnostic: SHOW MASTER STATUS returned empty result\");\n                            return;\n                        }\n                        String file = safeGetString(rs, \"File\");\n                        String position = safeGetString(rs, \"Position\");\n                        String gtidSet = safeGetString(rs, \"Executed_Gtid_Set\");\n                        LOG.warn(\n                                \"MySQL-CDC diagnostic: master status file={}, position={}, executed_gtid_set={}\",\n                                file,\n                                position,\n                                gtidSet);\n                    });\n        } catch (SQLException e) {\n            LOG.warn(\n                    \"MySQL-CDC diagnostic: failed to query SHOW MASTER STATUS: {}\", e.getMessage());\n        }\n    }\n\n    private void logMySqlReplicationStatus() {\n        if (logReplicationStatus(\"SHOW REPLICA STATUS\", \"replica\")) {\n            return;\n        }\n        logReplicationStatus(\"SHOW SLAVE STATUS\", \"slave\");\n    }\n","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java#L508-L544","documentation":"Diagnostic WARN from logMySqlMasterStatus logging the server's current binlog position: current file, position, and Executed_Gtid_Set from SHOW MASTER STATUS. Emitted when binlog/GTID availability checks fail, it lets developers compare the server's current binlog with the binlog filename required by the restored offset.","triggerScenarios":"SHOW MASTER STATUS returns a row during a diagnostic run triggered by checkGtidSet or the binlog-availability check finding the restored offset unavailable.","commonSituations":"Comparing logged 'file' with requiredBinlogFilename from logBinlogRangeAnalysis: if the required file is older than available binlogs, it was purged; if gtid set is empty, GTID mode is off.","solutions":["Increase binlog retention (binlog_expire_logs_seconds / expire_logs_days) and re-snapshot the job","Verify the required binlog file is within the server's retained binlog range (SHOW BINARY LOGS)","Use the Executed_Gtid_Set to confirm whether GTID-based resume is feasible"],"exampleFix":"// before\nSET PERSIST binlog_expire_logs_seconds = 3600; // 1h\n// after\nSET PERSIST binlog_expire_logs_seconds = 604800; // 7d","handlingStrategy":"validation","validationCode":"SHOW MASTER STATUS; -- capture File/Position/Executed_Gtid_Set\nSHOW BINARY LOGS; -- confirm checkpoint binlog file still in range\n-- required file must be >= oldest retained binlog","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Compare checkpoint binlog filename against SHOW BINARY LOGS before restarting","Increase binlog retention for long job stoppages","Prefer GTID-based resume so purged binlog files matter less","Re-snapshot the job when required binlogs are known to be purged"],"tags":["mysql","cdc","diagnostics","binlog","gtid"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}