You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed with @jhoeller, spring-projects/spring-boot#39469 has highlighted a problem with ThreadPoolTaskExecutor rejecting tasks once it has received a ContextClosedEvent. In a Spring Boot web application this creates a window where the task executor cannot be used but the web server is still accepting requests. Those requests will fail if they try to use the executor.
The text was updated successfully, but these errors were encountered:
ThreadPoolTaskExecutor (and also ThreadPoolExecutorFactoryBean) leniently accepts tasks after context close in combination with the coordinated lifecycle stop phase now. So this is not setAcceptTasksAfterContextClose(true) by default (which would bypass the lifecycle stop phase altogether) but rather lenient acceptance of further tasks which will nevertheless be rolled into the lifecycle stop phase, waiting for all such late submissions to complete still, resulting in a lenient variant of a graceful shutdown.
Schedulers remain strict on shutdown (otherwise the triggers would keep firing while we wait for all tasks to complete), just plain executors are lenient on shutdown now. An early shutdown for executors with strict rejecting of further task submissions can be enforced via setStrictEarlyShutdown(true).
Affects: 6.1.3
As discussed with @jhoeller, spring-projects/spring-boot#39469 has highlighted a problem with
ThreadPoolTaskExecutor
rejecting tasks once it has received aContextClosedEvent
. In a Spring Boot web application this creates a window where the task executor cannot be used but the web server is still accepting requests. Those requests will fail if they try to use the executor.The text was updated successfully, but these errors were encountered: