Skip to content

Fix for threads hanging with forwardTransformedResultTo #5117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

L-Applin
Copy link
Contributor

When using CompletableFutureUtils.forwardTransformedResultTo if the provided function throws an exception, it would not be catch which can prevent the destination future to be completed and hang on a .join() call.

Motivation and Context

Discovered during perf testing multipart s3 async client, as one of the test returned a null value.

Modifications

Surround the call to Function.apply() with a try-catch and complete the destination future with the caught exception.

Testing

Added unit test to CompletableUtils and TransferManager

@L-Applin L-Applin requested a review from a team as a code owner April 18, 2024 15:18
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
73.7% Coverage on New Code (required ≥ 80%)
3.4% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@L-Applin L-Applin merged commit e041ca2 into feature/master/s3mpu Apr 22, 2024
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.

2 participants