Skip to content

Fix short reads in fixed-length deserialization#17870

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:fix/read-fully-short-reads
Open

Fix short reads in fixed-length deserialization#17870
Caideyipi wants to merge 2 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.

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