Repository navigation
[To dev/1.1] Handle short reads from input streams - #1066
Merged
Merged
Conversation
JackieTien97
approved these changes
Nov 4, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/1.1 #1066 +/- ##
===========================================
+ Coverage 59.09% 59.20% +0.11%
===========================================
Files 420 420
Lines 28118 28158 +40
Branches 3716 3727 +11
===========================================
+ Hits 16615 16672 +57
+ Misses 11307 11290 -17
Partials 196 196 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
Backport of #1061 to
dev/1.1.Problem
ReadWriteIOUtilsassumed a singleInputStream.read()call would fill the requested buffer. TheInputStreamcontract permits partial reads, so valid data could fail withIntend to read N bytes but M are actually returned. ThereadAsPossibleoverloads also needed to distinguish zero-byte progress from EOF and avoid an extra hidden read.Change
EOFException.TsFileInput.read()and only treat negative values as EOF.readAsPossible(TsFileInput, long, ByteBuffer).BytesUtils.safeReadInputStreamToBytesfail on truncated input instead of returning zero-filled data.Compatibility
This backport keeps the
dev/1.1error-message and string-handling style and does not import develop-only i18n or unrelated refactors.Validation
Per repository constraints, compilation and tests were not run locally.
git diff --checkpassed.