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

Update warning log messages for SimpleAsyncTaskManager to take into account virtual thread mode #30902

Closed
rstoyanchev opened this issue Jul 17, 2023 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Jul 17, 2023

Currently we log this in WebAsyncManager and similar warning exists in ReactiveTypeHandler too:

!!!
An Executor is required to handle java.util.concurrent.Callable return values.
Please, configure a TaskExecutor in the MVC config under "async support".
The SimpleAsyncTaskExecutor currently in use is not suitable under load.
-------------------------------
Request URI: '/'
!!!

This should not be logged if using virtual threads.

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Jul 17, 2023
@rstoyanchev rstoyanchev added this to the 6.1.0-M3 milestone Jul 17, 2023
@rstoyanchev rstoyanchev self-assigned this Jul 17, 2023
@rstoyanchev rstoyanchev changed the title Update condition in WebAsyncManager for log warning to take into account virtual threads Update condition in WebAsyncManager for warning log message to take into account virtual threads Jul 17, 2023
@wilkinsona
Copy link
Member

wilkinsona commented Jul 17, 2023

Can a SimpleAsyncTaskExecutor with virtual threads enabled also be taken into account? It's what Boot auto-configures when virtual threads are enabled.

@quaff
Copy link
Contributor

quaff commented Jul 18, 2023

This should not be logged if the executor is VirtualThreadTaskExecutor.

VirtualThreadTaskExecutor is AsyncTaskExecutor, neither SimpleAsyncTaskExecutor nor SyncTaskExecutor.

public class VirtualThreadTaskExecutor implements AsyncTaskExecutor {

(executor instanceof SimpleAsyncTaskExecutor || executor instanceof SyncTaskExecutor)) {

@rstoyanchev rstoyanchev changed the title Update condition in WebAsyncManager for warning log message to take into account virtual threads Update warning log messages for SimpleAsyncTaskManager to take into account virtual thread mode Jul 18, 2023
@rstoyanchev
Copy link
Contributor Author

Indeed, VirtualThreadTaskExecutor is not relevant here, and we're checking for SimpleAsyncTaskExecutor. There is similar check and warning in ReactiveTypeHandler too. I've updated the title and description to reflect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants