{"record":{"id":"3a0a0eb1096df524","repo":"apache/seatunnel","slug":"mysqlincrementalsourceoptions-startup-specific","errorCode":null,"errorMessage":"'${MySqlIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_GTID_SET.key()}' must not be blank.","messagePattern":"'(.+?)' must not be blank\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/MySqlIncrementalSource.java","lineNumber":162,"sourceCode":"        if (gtidSet.isPresent()) {\n            offset.put(BinlogOffset.GTID_SET_KEY, gtidSet.get());\n        }\n        offset.put(BinlogOffset.EVENTS_TO_SKIP_OFFSET_KEY, String.valueOf(skipEvents));\n        offset.put(BinlogOffset.ROWS_TO_SKIP_OFFSET_KEY, String.valueOf(skipRows));\n        return offset;\n    }\n\n    /* Validate the configured GTID set before adding it to Debezium's offset map. */\n    private static Optional<String> getValidatedGtidSet(ReadonlyConfig config) {\n        Optional<String> configuredGtidSet =\n                config.getOptional(MySqlIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_GTID_SET);\n        if (!configuredGtidSet.isPresent()) {\n            return Optional.empty();\n        }\n\n        String gtidSet = configuredGtidSet.get().trim();\n        if (StringUtils.isBlank(gtidSet)) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"'%s' must not be blank.\",\n                            MySqlIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_GTID_SET.key()));\n        }\n\n        try {\n            new GtidSet(gtidSet);\n        } catch (Exception e) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Invalid '%s' value '%s'.\",\n                            MySqlIncrementalSourceOptions.STARTUP_SPECIFIC_OFFSET_GTID_SET.key(),\n                            gtidSet),\n                    e);\n        }\n        return Optional.of(gtidSet);\n    }\n","sourceCodeStart":144,"sourceCodeEnd":180,"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/MySqlIncrementalSource.java#L144-L180","documentation":"startup.specific-offset.gtid-set is optional, but if it is configured it must be a non-blank GTID set string. getValidatedGtidSet trims the value and throws IllegalArgumentException when it is empty/whitespace.","triggerScenarios":"getValidatedGtidSet (via createStartupConfig/gtidSet) with a configured specific-offset.gtid-set that is \"\" or whitespace after trim.","commonSituations":"Unfilled placeholder gtid-set = \"\"; env var expansion empty; user intended to disable GTID by blanking the value instead of removing the key.","solutions":["Provide a valid GTID set, e.g. \"3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5\"","Remove the startup.specific-offset.gtid-set key entirely if you don't want GTID-based startup","Obtain the executed GTID set from SELECT @@GLOBAL.gtid_executed on the source"],"exampleFix":"// before\nspecific-offset.gtid-set = \"\"\n// after\nspecific-offset.gtid-set = \"3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5\"","handlingStrategy":"validation","validationCode":"String gtid = config.getString(\"startup.specific-offset.gtid-set\");\nif (gtid != null && gtid.trim().isEmpty()) {\n    throw new IllegalArgumentException(\"gtid-set configured but blank; remove it or supply a valid GTID set\");\n}","typeGuard":"boolean nonBlank(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try { createSource(config); } catch (IllegalArgumentException e) { LOG.error(\"Bad gtid-set: {}\", e.getMessage()); throw new ConfigException(e); }","preventionTips":["Remove optional keys instead of setting them to \"\"","Source gtid_executed from the DB and template it in","Validate GTID syntax with a regex/Debezium GtidSet in CI"],"tags":["cdc","mysql","gtid","config-validation"],"backgroundTag":"empty-required-field","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"}