Skip to content

Fix downgraded TsFileResource serialization#18155

Open
jt2594838 wants to merge 2 commits into
masterfrom
fix_serialization_of_downgraded_resource
Open

Fix downgraded TsFileResource serialization#18155
jt2594838 wants to merge 2 commits into
masterfrom
fix_serialization_of_downgraded_resource

Conversation

@jt2594838

@jt2594838 jt2594838 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes TsFileResource serialization when the in-memory TimeIndex has been degraded to FileTimeIndex.

When a resource file already exists, serialization now preserves the device-level time index stored in the resource file instead of serializing the degraded in-memory FileTimeIndex directly.

Tests

  • mvn test -pl iotdb-core/datanode -Dtest=TsFileResourceTest
  • mvn verify -DskipUTs '-Dit.test=IoTDBRegionMigrateNormalITForIoTV2BatchIT#migrateRegionWithDegradedTimeIndexTest' -DfailIfNoTests=false '-Dfailsafe.failIfNoSpecifiedTests=false' '-Drat.skip=true' -pl integration-test -am -P with-integration-tests -PClusterIT

Follow-up

After rebasing to the latest master and reverting FileTimeIndex serialization, a local rerun of TsFileResourceTest was blocked by unrelated datanode compile errors in pipe classes.

@jt2594838 jt2594838 force-pushed the fix_serialization_of_downgraded_resource branch from ef0d353 to 6400947 Compare July 8, 2026 10:32
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.89%. Comparing base (e231bbe) to head (99ee9a2).

Files with missing lines Patch % Lines
...torageengine/dataregion/tsfile/TsFileResource.java 85.71% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18155      +/-   ##
============================================
+ Coverage     41.77%   41.89%   +0.12%     
  Complexity      318      318              
============================================
  Files          5297     5297              
  Lines        374233   374235       +2     
  Branches      48314    48313       -1     
============================================
+ Hits         156334   156790     +456     
+ Misses       217899   217445     -454     

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants