Improve handling of partial reads and EOF in Frame size limited filter by cshannon · Pull Request #2154 · apache/activemq · GitHub
Skip to content

Improve handling of partial reads and EOF in Frame size limited filter#2154

Merged
cshannon merged 1 commit into
apache:mainfrom
cshannon:frame-size-limited-improvement
Jun 23, 2026
Merged

Improve handling of partial reads and EOF in Frame size limited filter#2154
cshannon merged 1 commit into
apache:mainfrom
cshannon:frame-size-limited-improvement

Conversation

@cshannon

Copy link
Copy Markdown
Contributor

This update makes the following changes/improvements:

  • If the wrapped stream is finished and returns -1 this is now returned correctly and availableBytes are not decremented.
  • Partial reads now will be attempted up to the availableBytes limit
  • If 0 is passed in for the length for a partial read then no attempt to read is done and 0 is returned, in line with the spec.

This update makes the following changes/improvements:

* If the wrapped stream is finished and returns -1 this is now returned
  correctly and availableBytes are not decremented.
* Partial reads now will be attempted up to the availableBytes limit
* If 0 is passed in for the length for a partial read then no attempt to
  read is done and 0 is returned, in line with the spec.

@tabish121 tabish121 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seems reasonable for getting this a bit more aligned with a standard stream type

@cshannon cshannon merged commit 5d9c303 into apache:main Jun 23, 2026
9 of 10 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Apache ActiveMQ v6.3.0 Jun 23, 2026
@cshannon cshannon deleted the frame-size-limited-improvement branch June 23, 2026 23:43
cshannon added a commit that referenced this pull request Jun 24, 2026
#2154) (#2156)

This update makes the following changes/improvements:

* If the wrapped stream is finished and returns -1 this is now returned
  correctly and availableBytes are not decremented.
* Partial reads now will be attempted up to the availableBytes limit
* If 0 is passed in for the length for a partial read then no attempt to
  read is done and 0 is returned, in line with the spec.

(cherry picked from commit 5d9c303)
cshannon added a commit to cshannon/activemq that referenced this pull request Jun 24, 2026
apache#2154)

This update makes the following changes/improvements:

* If the wrapped stream is finished and returns -1 this is now returned
  correctly and availableBytes are not decremented.
* Partial reads now will be attempted up to the availableBytes limit
* If 0 is passed in for the length for a partial read then no attempt to
  read is done and 0 is returned, in line with the spec.

(cherry picked from commit 5d9c303)
cshannon added a commit that referenced this pull request Jun 24, 2026
#2154) (#2155)

This update makes the following changes/improvements:

* If the wrapped stream is finished and returns -1 this is now returned
  correctly and availableBytes are not decremented.
* Partial reads now will be attempted up to the availableBytes limit
* If 0 is passed in for the length for a partial read then no attempt to
  read is done and 0 is returned, in line with the spec.

(cherry picked from commit 5d9c303)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants