Skip to content
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

bug: Writeable responses not being offloaded since 4.0.0 #10723

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

timyates
Copy link
Contributor

In the documentation for Writing Response Data we have a section for Writeables which states:

When returning a Writable, the blocking I/O operation is shifted to the I/O thread pool so the Netty event loop is not blocked.

This is true in Micronaut 3.x, but does not happen in certain cases for 4.x

This PR provides a test which passes when added to the 3.10.x branch, but fails on all the current 4.x.x branches

This was discovered whilst investigating fixing views micronaut-projects/micronaut-views#757 as the views were not being delegated to an IO thread pool despite the current documentation there as well

@sdelamo sdelamo marked this pull request as ready for review April 17, 2024 07:34
Copy link

sonarcloud bot commented Apr 17, 2024

@timyates
Copy link
Contributor Author

@yawkat awesome 🥹

@sdelamo should I backport this to 4.3.x once merged?

@timyates timyates requested a review from sdelamo April 17, 2024 08:05
@sdelamo
Copy link
Contributor

sdelamo commented Apr 17, 2024

@yawkat awesome 🥹

@sdelamo should I backport this to 4.3.x once merged?

Maybe we can cherry pick the commit.

@sdelamo sdelamo merged commit 9117d99 into 4.4.x Apr 17, 2024
17 checks passed
@sdelamo sdelamo deleted the writeable-offload branch April 17, 2024 08:34
timyates added a commit that referenced this pull request Apr 17, 2024
* Reproducer for Writeable responses not being offloaded

* Wrap all writeTo calls in io executor

* backported from 4.4.x

---------

Co-authored-by: yawkat <[email protected]>
sdelamo pushed a commit that referenced this pull request Apr 17, 2024
…0729)

* Reproducer for Writeable responses not being offloaded

* Wrap all writeTo calls in io executor

* backported from 4.4.x

---------

Co-authored-by: yawkat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants