Repository navigation
Backport: support boolean loose-range for Pipe sources - #19480
Conversation
(cherry picked from commit 4906331)
| EXTRACTOR_HISTORY_LOOSE_RANGE_DEFAULT_VALUE) | ||
| .trim(); | ||
| if (EXTRACTOR_HISTORY_LOOSE_RANGE_ALL_VALUE.equalsIgnoreCase(extractorHistoryLooseRangeValue)) { | ||
| if (EXTRACTOR_HISTORY_LOOSE_RANGE_ALL_VALUE.equalsIgnoreCase(extractorHistoryLooseRangeValue) |
There was a problem hiding this comment.
minor iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileSource.java:188 — loose-range=false is rejected as an invalid option instead of disabling loose range
Boolean.parseBoolean only adds the true path: false falls into the else branch, where the token stays in sloppyOptionSet and throws PipeParameterNotValidException ("Parameters in set [false] are not allowed in 'history.loose-range'"). Hence 'source.loose-range'='false' and topic loose-range=false fail pipe creation while true is accepted. Same defect at PipeRealtimeDataRegionSource.java:181.
Fix: Handle the boolean explicitly before tokenizing: "true"/"all" -> all, "false" -> no loose range (empty), otherwise parse the comma-separated time/path option list; add a false test case.
There was a problem hiding this comment.
Thanks for catching this. Fixed in d31f345: both historical and realtime parsing now treat false as disabling loose range instead of tokenizing it. Added regression coverage for Pipe and Topic inputs. Verification: TopicConfigTest and IoTDBDataRegionSourceTest passed (6 tests executed; 1 existing test skipped).
|
Re-review round summary (reviewed PR head |
Cherry-pick of #19464 for the dev/1.3 branch.
Adds boolean loose-range handling for subscription topics and Pipe historical/realtime sources. A true value maps to all loose ranges, while stage-specific settings retain precedence over the global setting.
Validation: targeted Spotless and Maven tests passed for TopicConfigTest and IoTDBDataRegionSourceTest.