Pipe: order historical TsFiles by flush time#18088
Open
Caideyipi wants to merge 1 commit into
Open
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18088 +/- ##
=========================================
Coverage 41.65% 41.66%
Complexity 318 318
=========================================
Files 5296 5296
Lines 371663 371744 +81
Branches 48088 48103 +15
=========================================
+ Hits 154819 154889 +70
- Misses 216844 216855 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This PR adds a new historical pipe source option:
extractor.history.tsfile.order-by-flush-timesource.history.tsfile.order-by-flush-timetrueWhen enabled, historical TsFile-only extraction sends selected TsFiles in source-side file creation / flush-time order instead of progressIndex order. The goal is to preserve overwrite semantics for duplicated timestamps: older TsFiles are transferred first, and newer TsFiles are transferred later so the receiver can overwrite older values with newer values.
Semantic Changes
For historical TsFile extraction where insertions are captured and deletions are not captured:
ProgressReportEventwith the max progressIndex of the selected resources.When historical deletions are captured together with insertions, the source keeps the previous progressIndex ordering. Deletion resources only carry progressIndex ordering information, so this avoids changing insertion/deletion ordering semantics.
The option can be set to
falseto keep the previous progressIndex-based ordering.Tests / Coverage
Added unit coverage for:
true,I did not add an integration test because ordinary end-to-end write/flush scenarios usually produce progressIndex order that matches flush-time order, so such an IT would not deterministically cover the regression. The deterministic behavior that matters here is the historical source's resource ordering and progress reporting contract, which is covered by unit tests with explicit TsFileResource ordering and progressIndex setup.
Local verification:
mvn spotless:apply -pl iotdb-core/datanodemvn spotless:apply -pl iotdb-core/node-commonsmvn "-Ddevelocity.off=true" -o install -pl iotdb-core/node-commons "-DskipTests=true" "-Dcheckstyle.skip=true" "-Dspotless.check.skip=true"git diff --check origin/master..HEADAttempted datanode targeted UT execution locally, but the module currently fails during main compilation in this checkout before reaching the test phase due to unrelated generated-source / thrift cache errors such as missing
TShowRepairDataPartitionTableProgressResp,IFill, andAccumulatorclasses.