{"record":{"id":"bac66e8e396e4300","repo":"apache/seatunnel","slug":"the-auto-increment-start-value-is-too-large-pleas","errorCode":null,"errorMessage":"The auto increment start value is too large, please check your configuration.","messagePattern":"The auto increment start value is too large, please check your configuration\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java","lineNumber":104,"sourceCode":"        return (byte) RandomUtils.nextInt(fakeConfig.getTinyintMin(), fakeConfig.getTinyintMax());\n    }\n\n    public Short randomSmallint(Column column) {\n        List<Integer> smallintTemplate = fakeConfig.getSmallintTemplate();\n        if (!CollectionUtils.isEmpty(smallintTemplate)) {\n            return randomFromList(smallintTemplate).shortValue();\n        }\n        return (short)\n                RandomUtils.nextInt(fakeConfig.getSmallintMin(), fakeConfig.getSmallintMax());\n    }\n\n    public Integer randomInt(Column column) {\n        if (fakeConfig.getAutoIncrementEnabled()\n                && IdGeneratorUtils.isPrimaryColumn(fakeConfig, column.getName())) {\n            if (fakeConfig.getAutoIncrementStart()\n                            + ((long) fakeConfig.getParallelism() * fakeConfig.getRowNum())\n                    > Integer.MAX_VALUE) {\n                throw new IllegalArgumentException(\n                        \"The auto increment start value is too large, please check your configuration.\");\n            }\n            return IdGeneratorUtils.getIdGenerator(jobId, fakeConfig, column.getName())\n                    .orElseThrow(\n                            () ->\n                                    new IllegalArgumentException(\n                                            \"Auto increment is enabled, but no id generator found.\"))\n                    .getNextId()\n                    .intValue();\n        }\n        List<Integer> intTemplate = fakeConfig.getIntTemplate();\n        if (!CollectionUtils.isEmpty(intTemplate)) {\n            return randomFromList(intTemplate);\n        }\n        return RandomUtils.nextInt(fakeConfig.getIntMin(), fakeConfig.getIntMax());\n    }\n\n    public Long randomBigint(Column column) {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java#L86-L122","documentation":"When auto-increment is enabled for a fake primary-key column, the connector validates that autoIncrementStart + (parallelism * rowNum) fits within Integer.MAX_VALUE before generating ids. If the configured start value combined with the total rows to generate would overflow an int, randomInt throws IllegalArgumentException.","triggerScenarios":"Fake source config with fake.data.auto-increment.enabled=true on a primary column, and auto-increment-start set so high that start + (parallelism * rowNum) exceeds Integer.MAX_VALUE (2147483647).","commonSituations":"Copying a large auto-increment start from a production database (e.g. values near 2^31) into the fake source config; large rowNum multiplied by parallelism pushing the total over the int limit; misunderstanding that generated ids are 32-bit ints.","solutions":["Lower the fake.data.auto-increment.start value so that start + (parallelism * rowNum) stays below Integer.MAX_VALUE.","Reduce fake.data.rownum (and/or parallelism) so the total generated rows fit within the int range from the start value.","Change the column type to BIGINT if you need a large id range, if the generator/auto-increment path supports it.","Compute the budget: max start ≈ 2147483647 - (parallelism * rowNum), and keep your start below it."],"exampleFix":"// before\nfake.data.auto-increment.enabled = true\nfake.data.auto-increment.start = 2147483000\nfake.data.rownum = 10000\n// after\nfake.data.auto-increment.enabled = true\nfake.data.auto-increment.start = 1000000\nfake.data.rownum = 10000","handlingStrategy":"validation","validationCode":"long start = config.getAutoIncrementStart();\nlong total = (long) config.getParallelism() * config.getRowNum();\nif (start + total > Integer.MAX_VALUE) {\n    throw new IllegalArgumentException(\n        \"auto-increment.start too large: max allowed is \" + (Integer.MAX_VALUE - total));\n}","typeGuard":null,"tryCatchPattern":"try {\n    runFakeSourceJob(config);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"auto increment start value is too large\")) {\n        log.warn(\"Lower auto-increment start or reduce rownum/parallelism\", e);\n        config.setAutoIncrementStart(defaultSafeStart);\n    } else {\n        throw e;\n    }\n}","preventionTips":["Compute start + (parallelism * rownum) and keep it under 2147483647 in config review.","Use modest auto-increment starts (e.g. 1, 1000000) for fake/test data.","Use BIGINT columns when large id values are required.","Document the int limit where auto-increment configuration is shared with the team."],"tags":["fake-connector","auto-increment","integer-overflow","config"],"backgroundTag":"value-out-of-range","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}