Repository navigation
Conversation
| if (reduced == null) { | ||
| return null; | ||
| } | ||
| switch (plugin) { |
There was a problem hiding this comment.
critical iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeParameterDefinitions.java:190 — Consensus-v2 connector attributes rejected: IOT_CONSENSUS_V2_ASYNC_CONNECTOR falls through to IOTDB_SINK
sinkDefinitions() has no case for IOT_CONSENSUS_V2_ASYNC_CONNECTOR/PIPE_CONSENSUS_ASYNC_CONNECTOR, so it returns IOTDB_SINK.get(reduced). RegionMaintainHandler.buildConsensusPipeReq sets connector.consensus.pipe-name, which is absent from iotdbSink(), so validateSink() throws PipeParameterNotValidException and consensus pipe creation (region migration / add peer) fails.
Fix: Add explicit cases for IOT_CONSENSUS_V2_ASYNC_CONNECTOR/PIPE_CONSENSUS_ASYNC_CONNECTOR (and _SINK) accepting consensus.group-id, consensus.pipe-name, ip/host/port, parallel.tasks, realtime-first, plus common sink keys.
There was a problem hiding this comment.
Thanks for the report. Common sink keys are resolved first, and consensus plugins fall through to IOTDB_SINK, which already defines the consensus and connection fields named here. I added regression coverage for the current and legacy connector/sink plugin names; no production change was needed for this case.
| case DO_NOTHING_CONNECTOR: | ||
| case DO_NOTHING_SINK: | ||
| return null; | ||
| case SUBSCRIPTION_SINK: |
There was a problem hiding this comment.
critical iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeParameterDefinitions.java:194 — subscription-sink rejects sink.topic / sink.consumer-group
SUBSCRIPTION_SINK only accepts reduced keys "topic" and "consumer-group", but SubscriptionSinkSubtaskManager reads PipeSinkConstant.SINK_TOPIC_KEY ("sink.topic") and SINK_CONSUMER_GROUP_KEY ("sink.consumer-group"). Any subscription pipe created with sink.topic/sink.consumer-group now fails validation with 'Ignoring unknown PIPE parameter'.
Fix: Accept both "topic"/"sink.topic" and "consumer-group"/"sink.consumer-group" (and connector.* aliases) for SUBSCRIPTION_SINK.
There was a problem hiding this comment.
PipeParameters.KeyReducer removes the leading sink. or connector. prefix before lookup, so the existing topic and consumer-group definitions already accept all three forms. I added regression coverage for unprefixed, sink.*, and connector.* attributes; no production change was needed.
| case RENAME_DATABASE_PROCESSOR: | ||
| known = reduced.equals("new-db-name"); | ||
| break; | ||
| default: |
There was a problem hiding this comment.
major iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeParameterDefinitions.java:167 — standard-statistics-processor parameters are all rejected as unknown
processors() has no case for STANDARD_STATISTICS_PROCESSOR, so known is false for every key and validateProcessor() throws PipeParameterNotValidException for any attribute of that builtin processor (e.g. output.* keys it consumes), breaking pipes that use it.
Fix: Add a STANDARD_STATISTICS_PROCESSOR case mapping its supported keys (output.*, operators, windowing-strategy, etc.) to PROCESSOR definitions.
There was a problem hiding this comment.
Added STANDARD_STATISTICS_PROCESSOR to the aggregate-style whitelist for output.*, sliding.*, operators, and windowing-strategy parameters, with regression coverage.
| properties.getProperty( | ||
| "max_sub_task_num_for_information_table_scan", | ||
| Integer.toString(conf.getMaxSubTaskNumForInformationTableScan()))); | ||
| if (maxSubTaskNumForInformationTableScan > 0) { |
There was a problem hiding this comment.
major iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java:1351 — Removed overlayEffectiveConfigurationValues() leaves show configuration showing raw values
The overlay was deleted, but several keys still bypass ConfigValidation and are rewritten by setters: sort_buffer_size_in_bytes / mods_cache_size_limit_per_fi_in_bytes (loadFixedSizeLimitForQuery rewrites <=0), cte_buffer_size_in_bytes, max_rows_in_cte_buffer, max_sub_task_num_for_information_table_scan, mpp_data_exchange_max_payload_size_in_bytes, table_query_device_entry_batch_size_in_bytes, wal throttle threshold. For these, lastAppliedProperties now reports the raw file value instead of the
…[truncated]
Fix: Route these keys through ConfigValidation (or keep an explicit overlay) so the applied-properties map reflects the effective value.
There was a problem hiding this comment.
Restored the effective-value overlay after startup loading and hot reload for the listed runtime-rewritten settings. The regression test verifies that the applied-properties map reports the effective values rather than the raw inputs.
|
Review update summary
|
| config.setPipeHardlinkBaseDirName( | ||
| properties.getProperty("pipe_hardlink_base_dir_name", config.getPipeHardlinkBaseDirName())); | ||
| database( | ||
| properties, |
There was a problem hiding this comment.
major iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeDescriptor.java:64 — directory() rule rejects valid relative pipe hardlink dir names
pipe_hardlink_base_dir_name / pipe_hardlink_tsfile_dir_name are documented as relative directory names (e.g. pipe), but ConfigValidation.directory() only accepts values that Path.of can parse, so pipe is rejected and the configured value is silently replaced by the default with a warning. Previously any string was accepted.
Fix: Use a plain STRING definition (or a rule that only rejects blank/invalid characters) for these two keys instead of directory().
There was a problem hiding this comment.
The directory() rule uses Path.of to check syntax. Relative paths are accepted, and the path does not have to exist. I added a regression test that loads distinct relative values for both hardlink directory settings and checks they are retained. No production change was needed.
| new Type<>(value -> BOOLEAN.parser().apply(value.trim()), "boolean"), | ||
| false, | ||
| unrestricted()); | ||
| private static final Definition<String> MODE = |
There was a problem hiding this comment.
major iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/topic/TopicParameterDefinitions.java:60 — Topic mode/order-mode/format validated before normalization, rejecting previously valid values
MODE/ORDER_MODE/FORMAT parse with TopicConfig::normalizeMode/normalizeOrderMode (trim + lowercase + legacy live/consensus aliases) but the rule oneOf(true, ...) compares against the raw value, so mode=LIVE, mode=CONSENSUS, order-mode=LEADER_ONLY or format=RECORD_HANDLER now fail validation although TopicConfig.isValidMode/isValidOrderMode accept them.
Fix: Apply the same normalization inside the rule (e.g. matches(v -> TopicConfig.isValidMode(v), ...) / isValidOrderMode / case-insensitive format check) so validation matches TopicConfig semantics.
There was a problem hiding this comment.
Definition.parse() runs the type parser before applying the rule, so mode and order-mode are normalized before validation. The format allowlist compares case-insensitively. The regression test covers LIVE, CONSENSUS, LEADER-ONLY, and uppercase SubscriptionRecordHandler. LEADER_ONLY and RECORD_HANDLER are not existing configuration aliases. No production change was needed.
28a8d72 to
fb27d58
Compare
|
Review and CI follow-up
|
| if (defaultValue == null && hotReload && legacyKey != null) { | ||
| defaultValue = ConfigurationFileUtils.getConfigurationDefaultValue(legacyKey); | ||
| } | ||
| if (value == null && legacyValue == null && defaultValue == null) { |
There was a problem hiding this comment.
major iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeDescriptor.java:893 — Hot reload resets pipe settings to template defaults when key is absent
loadExternal() no longer returns early when both value and legacyValue are null on hot reload; it resolves defaultValue from the template and calls the setter with it. Previously parserPipeConfig() returned null and the setter was skipped. Any set configuration that does not include e.g. pipe_sink_timeout_ms now overwrites the running value with the template default.
Fix: Restore the early return when value == null && legacyValue == null regardless of hotReload, so absent keys leave the current runtime value untouched.
There was a problem hiding this comment.
Fixed in 9b0c01accf3. During hot reload, loadExternal() now returns immediately when both the primary and legacy values are absent, leaving the current runtime setting unchanged. Added regression coverage for the missing-key case.
| final String value = properties.getProperty(key, null); | ||
| final String legacyValue = properties.getProperty(legacyKey, null); | ||
| final Definition<T> definition = new Definition<>(type, defaultValue, rule); | ||
| return value != null |
There was a problem hiding this comment.
major iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/ConfigValidation.java:274 — databaseAlias ignores legacy value when primary key is invalid
When the primary key is present but invalid, databaseAlias() falls back to defaultValue instead of the legacy key's value, and the warning names the primary key. E.g. default_database_level=abc with a valid default_storage_group_level=2 yields the built-in default 1 rather than 2, silently changing the effective database level.
Fix: On failure of the primary key, retry with the legacy value (databaseValue(properties, legacyKey, legacyValue, definition)) before falling back to defaultValue.
There was a problem hiding this comment.
Fixed in 9b0c01accf3. When the primary value is invalid, databaseAlias() now validates the legacy value before falling back to the configured default, and records the effective value under the primary key. Added regression coverage for an invalid primary value with a valid legacy value.
| .map(String::trim) | ||
| .mapToInt(Integer::parseInt) | ||
| .toArray(); | ||
| long proportionSum = Arrays.stream(schemaMemoryProportion).asLongStream().sum(); |
There was a problem hiding this comment.
minor iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/DataNodeMemoryConfig.java:347 — Zero-sum schema_memory_proportion now divides by zero
The previous code skipped applying the configured proportions when their sum was 0, keeping {5,4,1}. The new code computes proportionSum from the parsed values and divides by it unconditionally, so schema_memory_proportion=0:0:0 (previously accepted) throws ArithmeticException during startup.
Fix: Keep the old guard: if proportionSum == 0, fall back to the default {5,4,1} proportions (or reject the value in the weights rule).
There was a problem hiding this comment.
The schema proportion definition already uses weights(3), whose validation requires a positive sum. Therefore 0:0:0 is rejected and databaseAlias() falls back to 5:4:1 before allocation, so the division-by-zero scenario is not reachable for this input. Added regression coverage confirming the default allocations; no production change was needed.
|
Review update summary
|
|
Review update summary
|
Summary
Example
For the aggregate processor,
processor.output.max-delay-seconds=-1remains the supported unlimited value, while-2is rejected. Invalid database values fall back to the configured default with a warning.Testing
spotless:apply -P with-integration-tests -pl iotdb-core/node-commons,iotdb-core/confignode,iotdb-core/datanodepassed.