Support serializing plain device time index#17285
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17285 +/- ##
============================================
- Coverage 39.70% 39.69% -0.01%
Complexity 282 282
============================================
Files 5100 5100
Lines 341950 341966 +16
Branches 43559 43560 +1
============================================
- Hits 135769 135747 -22
- Misses 206181 206219 +38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates time index serialization behavior to migrate legacy (plain) device time indexes into the newer array-based format when writing resources, and adds a regression test to validate repairing/moving an old-version resource file results in an ArrayDeviceTimeIndex.
Changes:
- Add a compaction repair test that loads a v3 tsfile + legacy resource file and validates the repaired resource uses
ARRAY_DEVICE_TIME_INDEX_TYPE. - Remove
PlainDeviceTimeIndex’s unsupportedserializeoverride so it can be written using the array-format serializer. - Adjust
ArrayDeviceTimeIndex.serializeto always write the array time index type marker.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairUnsortedFileCompactionTest.java | Adds coverage for repairing/moving an old-version resource and asserting time index type migration to array format. |
| iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/PlainDeviceTimeIndex.java | Enables serialization (via inherited serializer) by removing the previous UnsupportedOperationException serialize override. |
| iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/ArrayDeviceTimeIndex.java | Forces serialized time index type marker to ARRAY_DEVICE_TIME_INDEX_TYPE to support migration-on-write behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Description
Support serializing plain device time index