Skip to content

Fixed multiple bugs of insertion#17570

Open
Caideyipi wants to merge 7 commits intomasterfrom
insert-fix
Open

Fixed multiple bugs of insertion#17570
Caideyipi wants to merge 7 commits intomasterfrom
insert-fix

Conversation

@Caideyipi
Copy link
Copy Markdown
Collaborator

@Caideyipi Caideyipi commented Apr 28, 2026

Description

Write failure issue:
* If the creation of TsFileProcessor fails, it may be treated as a successful return, resulting in silent data loss.
* Failed writes will still update the last cache, and the memory state may be ahead of the actual write.
* When InsertRows retries after a DataTypeInconsistentException, it fails to re-distribute seq/unseq for each row, potentially resulting in some rows being overwritten to the wrong processor.
* The failure callback for InsertRows/InsertRowsOfOneDevice may result in missed reports.


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 36.15385% with 166 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.97%. Comparing base (6680d6f) to head (89f448b).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
.../iotdb/db/storageengine/dataregion/DataRegion.java 34.25% 71 Missing ⚠️
...va/org/apache/iotdb/commons/conf/CommonConfig.java 41.66% 21 Missing ⚠️
...hrift/async/handler/PipeTransferTsFileHandler.java 0.00% 12 Missing ⚠️
...che/iotdb/db/pipe/agent/task/PipeDataNodeTask.java 0.00% 11 Missing ⚠️
...ft/async/handler/PipeTransferTrackableHandler.java 0.00% 11 Missing ⚠️
...plan/planner/plan/node/write/InsertTabletNode.java 70.37% 8 Missing ⚠️
...db/db/pipe/agent/task/stage/PipeTaskSinkStage.java 0.00% 5 Missing ⚠️
...cription/task/stage/SubscriptionTaskSinkStage.java 0.00% 5 Missing ⚠️
.../db/pipe/agent/task/stage/PipeTaskSourceStage.java 0.00% 4 Missing ⚠️
...c/handler/PipeTransferTabletBatchEventHandler.java 0.00% 4 Missing ⚠️
... and 10 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17570      +/-   ##
============================================
+ Coverage     39.88%   39.97%   +0.08%     
  Complexity     2547     2547              
============================================
  Files          5172     5173       +1     
  Lines        348236   348388     +152     
  Branches      44497    44528      +31     
============================================
+ Hits         138899   139266     +367     
+ Misses       209337   209122     -215     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant