Skip to content

Fix short reads in fixed-length deserialization#17870

Merged
jt2594838 merged 5 commits into
apache:masterfrom
Caideyipi:fix/read-fully-short-reads
Jun 23, 2026
Merged

Fix short reads in fixed-length deserialization#17870
jt2594838 merged 5 commits into
apache:masterfrom
Caideyipi:fix/read-fully-short-reads

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

  • Add FileChannel readFully helpers and use readFully/DataInputStream.readFully for fixed-length deserialization paths.
  • Handle EOF explicitly for one-byte enum/category deserialization.
  • Add regression tests for short reads and truncated payloads.

Verification

  • .\mvnw.cmd -pl iotdb-core/node-commons -Dtest=IOUtilsTest test
  • .\mvnw.cmd -pl iotdb-core/node-commons,iotdb-core/calc-commons,iotdb-core/confignode,iotdb-core/datanode spotless:apply
  • git diff --check
  • Static grep audit found no remaining obvious same-pattern values()[stream.read()] or fixed-length read comparison cases outside excluded areas.

Datanode focused tests were attempted, but local Windows verification was blocked by page-file/native-memory failures and existing datanode generated-source compilation issues unrelated to this patch.

@jt2594838 jt2594838 merged commit aa2acd6 into apache:master Jun 23, 2026
40 checks passed
@jt2594838 jt2594838 deleted the fix/read-fully-short-reads branch June 23, 2026 02:14
Caideyipi added a commit to Caideyipi/iotdb that referenced this pull request Jun 23, 2026
* Fix short reads in fixed-length deserialization

* Fix tag log append EOF handling

* spotless

---------

(cherry picked from commit aa2acd6)
jt2594838 pushed a commit that referenced this pull request Jun 24, 2026
* Fix short reads in fixed-length deserialization

* Fix tag log append EOF handling

* spotless

---------

(cherry picked from commit aa2acd6)
MileaRobertStefan pushed a commit to MileaRobertStefan/iotdb that referenced this pull request Jun 26, 2026
* Fix short reads in fixed-length deserialization

* Fix tag log append EOF handling

* spotless

---------

Co-authored-by: Jiang Tian <jt2594838@163.com>
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