LuciferYang opened a new pull request, #9779:
URL: https://github.com/apache/paimon/pull/9779

   ### Purpose
   
   close #9778
   
   `skipFully` looped `while (bytes > 0) { bytes -= in.skip(bytes); }`. A 
blocking stream at end of file returns 0 from skip, so a small forward seek (up 
to 1 MiB, used by the vectored-read seek helper) past a truncated or 
shorter-than-expected file spun forever instead of failing the read with an 
end-of-file error.
   
   Throw `EOFException` when a skip call makes no progress. The same loop was 
replicated in `HadoopFileIO` and in every `HadoopCompliantFileIO` wrapper 
(azure, cosn, gs, jindo, obs, oss, s3); all copies are updated.
   
   ### Tests
   
   `HadoopFileIOSkipFullyTest`: reflection into the private stream class with a 
mocked `FSDataInputStream` whose skip returns 0 — asserts the `EOFException` 
and message. RED verified on master: the unfixed loop surfaces the stub's 
`IOException` instead of `EOFException` (a pure always-0 stub spins forever on 
master, which is the bug).
   
   ### API and Format
   
   No format change. For every stream that makes progress, behavior is 
unchanged; only the previously-hanging case now fails loudly.
   
   ### Documentation
   
   None.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to