You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/10/03 16:13:48 UTC
[PR] fix(nosql): return 0 for zero-length reads at EOF [polaris]
fallintoplace opened a new pull request, #5683:
URL: https://github.com/apache/polaris/pull/5683
## What
- Return `0` for a valid zero-length read at EOF.
## Why
- Empty reads should follow the `InputStream` contract.
## Implementation
- Validate the buffer range before the zero-length return.
- Add cases for empty and exhausted streams.
## Checklist
- [x] No security issue disclosed.
- [x] Reason is explained above.
- [x] Regression coverage added.
- [x] No complex logic comments are needed.
- [x] Changelog and docs are not needed.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(nosql): return 0 for zero-length reads at EOF [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5683:
URL: https://github.com/apache/polaris/pull/5683#issuecomment-6329808366
`InputStream`'s javadoc (Temurin v. 21) says: `Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.`
My reading is that current impl. fits that contract.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org