{"record":{"id":"905037594af3954d","repo":"apache/shardingsphere","slug":"invalid-streaming-range-type-value-s-expect","errorCode":null,"errorMessage":"Invalid 'streaming-range-type' value: `%s`, expected values are %s","messagePattern":"Invalid 'streaming-range-type' value: `(.+?)`, expected values are (.+?)","errorType":"exception","errorClass":"PipelineInvalidParameterException","httpStatus":null,"severity":"error","filePath":"kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/table/DataMatchTableDataConsistencyChecker.java","lineNumber":86,"sourceCode":"            result = Integer.parseInt(chunkSizeText);\n        } catch (final NumberFormatException ignore) {\n            throw new PipelineInvalidParameterException(\"'chunk-size' is not a valid number: `\" + chunkSizeText + \"`\");\n        }\n        if (result <= 0) {\n            throw new PipelineInvalidParameterException(\"Invalid 'chunk-size' value: `\" + result + \"`, it should be a positive integer.\");\n        }\n        return result;\n    }\n    \n    private StreamingRangeType getStreamingRangeType(final Properties props) {\n        String streamingRangeTypeText = props.getProperty(STREAMING_RANGE_TYPE_KEY);\n        if (Strings.isNullOrEmpty(streamingRangeTypeText)) {\n            return DEFAULT_STREAMING_RANGE_TYPE;\n        }\n        try {\n            return StreamingRangeType.valueOf(streamingRangeTypeText.toUpperCase());\n        } catch (final IllegalArgumentException ex) {\n            throw new PipelineInvalidParameterException(\"Invalid 'streaming-range-type' value: `\" + streamingRangeTypeText\n                    + \"`, expected values are \" + Arrays.toString(StreamingRangeType.values()));\n        }\n    }\n    \n    @Override\n    public TableInventoryChecker buildTableInventoryChecker(final TableInventoryCheckParameter param) {\n        return new DataMatchTableInventoryChecker(param, chunkSize, streamingRangeType);\n    }\n    \n    @Override\n    public Collection<DatabaseType> getSupportedDatabaseTypes() {\n        return ShardingSphereServiceLoader.getServiceInstances(DatabaseType.class);\n    }\n    \n    @Override\n    public void close() {\n    }\n    ","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/table/DataMatchTableDataConsistencyChecker.java#L68-L104","documentation":"DataMatchTableDataConsistencyChecker maps the 'streaming-range-type' property to the StreamingRangeType enum via valueOf after upper-casing. Any value not matching an enum constant (e.g. the documented values listed in the exception via Arrays.toString(StreamingRangeType.values())) throws PipelineInvalidParameterException with the invalid text and the accepted set. Like chunk-size, this fails at checker construction, before any data is compared.","triggerScenarios":"Setting streaming-range-type: id / random / unknown-token in the DATA_MATCH algorithm props where the enum only accepts its defined constants (compare the message's expected-values list); or a casing/typo variant that does not match even after toUpperCase.","commonSituations":"Copying streaming-range-type from an older/newer ShardingSphere doc where the enum constants differ across versions; renaming of enum values breaking existing configs after upgrade; guessing a plausible value instead of checking the enum.","solutions":["Read the exception text — it prints the exact accepted values — and set streaming-range-type to one of them (e.g. the default).","Remove the key to use DEFAULT_STREAMING_RANGE_TYPE.","After upgrading ShardingSphere, re-verify pipeline algorithm prop names/values against the release's StreamingRangeType enum."],"exampleFix":"# before\nprops:\n  streaming-range-type: primary_key\n\n# after\nprops:\n  streaming-range-type: ID  # use a value from StreamingRangeType.values()","handlingStrategy":"validation","validationCode":"Set<String> valid = Arrays.stream(StreamingRangeType.values()).map(Enum::name).collect(Collectors.toSet());\nString value = props.getProperty(\"streaming-range-type\");\nif (null != value && !valid.contains(value.toUpperCase())) {\n    throw new IllegalArgumentException(\"streaming-range-type must be one of \" + valid);\n}","typeGuard":null,"tryCatchPattern":"try {\n    new DataMatchTableDataConsistencyChecker(props);\n} catch (final PipelineInvalidParameterException ex) {\n    // message lists accepted values; correct prop and resubmit\n}","preventionTips":["After each ShardingSphere upgrade, diff enum-backed pipeline props against the new release notes.","Copy enum values from the exception message or the StreamingRangeType source, never from memory."],"tags":["pipeline","consistency-check","configuration","enum","validation"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}