{"record":{"id":"7d3185b857517b28","repo":"apache/seatunnel","slug":"illegal-config-argument-7d3185","errorCode":"ILLEGAL_CONFIG_ARGUMENT","errorMessage":"Option 'page_size' must be in range [%s, %s], but got %s","messagePattern":"Option 'page_size' must be in range \\[(.+?), (.+?)\\], but got (.+?)","errorType":"validation","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphSourceConfig.java","lineNumber":106,"sourceCode":"                config.getOptional(HugeGraphSourceOptions.LABEL_TYPE)\n                        .orElse(HugeGraphSourceOptions.LABEL_TYPE.defaultValue()));\n        sourceConfig.setSchema(null);\n        sourceConfig.setPageSize(\n                config.getOptional(HugeGraphSourceOptions.PAGE_SIZE)\n                        .orElse(HugeGraphSourceOptions.PAGE_SIZE.defaultValue()));\n        sourceConfig.setSplitSize(\n                config.getOptional(HugeGraphSourceOptions.SPLIT_SIZE)\n                        .orElse(HugeGraphSourceOptions.SPLIT_SIZE.defaultValue()));\n        config.getOptional(HugeGraphSourceOptions.TIME_ZONE).ifPresent(sourceConfig::setTimeZone);\n        validate(sourceConfig);\n        return sourceConfig;\n    }\n\n    private static void validate(HugeGraphSourceConfig sourceConfig) {\n        int pageSize = sourceConfig.getPageSize();\n        if (pageSize < HugeGraphSourceOptions.MIN_PAGE_SIZE\n                || pageSize > HugeGraphSourceOptions.MAX_PAGE_SIZE) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\n                            \"Option 'page_size' must be in range [%s, %s], but got %s\",\n                            HugeGraphSourceOptions.MIN_PAGE_SIZE,\n                            HugeGraphSourceOptions.MAX_PAGE_SIZE,\n                            pageSize));\n        }\n\n        if (sourceConfig.getSplitSize() < HugeGraphSourceOptions.MIN_SPLIT_SIZE) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\n                            \"Option 'split_size' must be at least %s bytes (the HugeGraph minimum \"\n                                    + \"shard size); a smaller value would split the keyspace into a \"\n                                    + \"huge number of shards and risk OOM / oversized checkpoints. \"\n                                    + \"Got %s.\",\n                            HugeGraphSourceOptions.MIN_SPLIT_SIZE, sourceConfig.getSplitSize()));\n        }","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphSourceConfig.java#L88-L124","documentation":"HugeGraphSourceConfig.validate enforces that the 'page_size' option lies within [MIN_PAGE_SIZE, MAX_PAGE_SIZE] defined in HugeGraphSourceOptions. Out-of-range values would create overly large or degenerate paged Gremlin queries, so the connector throws ILLEGAL_CONFIG_ARGUMENT at config construction.","triggerScenarios":"Calling HugeGraphSourceConfig.of(...) or ofReadAll(...) with 'page_size' set below MIN_PAGE_SIZE or above MAX_PAGE_SIZE.","commonSituations":"Typo like page_size = 0 or negative values; copying a huge page size from another connector; assuming page_size is unlimited and setting e.g. 1000000.","solutions":["Set 'page_size' to a value within the range shown in the message (e.g. 500)","Check HugeGraphSourceOptions.MIN_PAGE_SIZE / MAX_PAGE_SIZE for the exact bounds","Remove the option entirely to use the documented default"],"exampleFix":"// before\npage_size = 0\n// after\npage_size = 500","handlingStrategy":"validation","validationCode":"int ps = config.getInt(\"page_size\");\nif (ps < MIN_PAGE_SIZE || ps > MAX_PAGE_SIZE) throw new IllegalArgumentException(\"page_size out of range\");","typeGuard":null,"tryCatchPattern":"try { HugeGraphSourceConfig.of(config); } catch (HugeGraphConnectorException e) { if (e.getCode() == ILLEGAL_CONFIG_ARGUMENT) log.error(\"Fix page_size: {}\", e.getMessage()); }","preventionTips":["Keep page_size between the documented MIN/MAX bounds (default ~500)","Never set page_size to 0 or negative values","Clamp user input programmatically before building the config"],"tags":["hugegraph","config","source","validation"],"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-14T05:17:10.506Z"}