Skip to content

[JCS-244] Fix the LateralTCPListener.handleClient to survive other exceptions#407

Closed
orlat84 wants to merge 5 commits intoapache:release-3.2.1from
orlat84:JCS-244-my-fix
Closed

[JCS-244] Fix the LateralTCPListener.handleClient to survive other exceptions#407
orlat84 wants to merge 5 commits intoapache:release-3.2.1from
orlat84:JCS-244-my-fix

Conversation

@orlat84
Copy link

@orlat84 orlat84 commented Mar 6, 2026

In case a java.nio.BufferUnderflowException occurs in LateralTCPListener.handleClient the listener thread dies and does not recover, then the cache cluster is no longer consistent.

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • I used AI to create any part of, or all of, this pull request. Which AI tool was used to create this pull request, and to what extent did it contribute?
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

orlat84 and others added 3 commits March 6, 2026 05:55
…java.nio.BufferUnderflowException or other exceptions
Updated the version as per the warning message
Updated cache version to v3 as per the warning message
Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

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

You'll want to add a unit test to this PR, otherwise this will be a regression waiting to happen.

with:
persist-credentials: false
- uses: actions/cache@v3.3.1
- uses: actions/cache@v3
Copy link
Member

Choose a reason for hiding this comment

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

Do not edit this file.

Copy link
Author

Choose a reason for hiding this comment

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

Modified it, as some pipelines were failing and was getting notifications quite often on this

persist-credentials: false
- uses: actions/cache@v3.3.1
with:
persist-credentials: false
Copy link
Member

Choose a reason for hiding this comment

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

Do not edit this file.

Copy link
Author

Choose a reason for hiding this comment

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

Modified it, as some pipelines were failing and was getting notifications quite often on this

@garydgregory
Copy link
Member

CC @tvand

@tvand
Copy link
Contributor

tvand commented Mar 9, 2026

Hi Florin,
I understand that this bug needs fixing. However I don't believe that LateralTCPListener is the right place for the fix. This needs to be addressed in IElementSerializer.deSerializeFrom() because this method is used in several places.

Please note that I will not fix this issue in the jcs3 release anymore but in jcs4 (master branch).

@tvand
Copy link
Contributor

tvand commented Mar 9, 2026

Fixed with commit 96db75a

@tvand tvand closed this Mar 9, 2026
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.

3 participants