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

Errors thrown from SmartLifeycle#stop results in (unnecessary) waiting for the shutdown timeout #33442

Closed
joshiste opened this issue Aug 28, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@joshiste
Copy link
Contributor

When the stop method of a SmartLifecycle bean throws an error, the DefaultLifecycleProcessor always waits until the timeout is hit. Which is unnecessary as no cleanup is performed and delays the shutdown.

Imho when calling the stop() method the DefaultLifecycleProcessor should also do a latch.countDown in case an exception is thrown.

(In our case we had a stop method which was interacting with the database. When we did some DB failover testing, this method has thrown some exception and the shutdown got delayed)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 28, 2024
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 28, 2024
@jhoeller jhoeller self-assigned this Aug 28, 2024
@jhoeller jhoeller added this to the 6.1.13 milestone Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants