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
</details>
#### Input Code
<!-- Java/Kotlin/Scala/Groovy/… or Repo link if applicable: -->
<details>
<summary>Input Code</summary>
```java
// your code here;
Expected behavior/code
Gracefully handle calls to DefaultPauseDetectorWrapper#retain during shutdown.
Just shutdown the PauseDetector immediately because it would have been shutdown anyway.
Additional context
Our use case was that we wanted to finish processing after getting SIGTERM and gracefully shutdown.
We solved it by using Spring's @DependsOn annotation.
Another possible use case is to SET something in Redis at shutdown time.
The text was updated successfully, but these errors were encountered:
Thanks for the report. I'm not sure about the direction here. This scenario shows a state where the system is in shutdown and adding a shutdown hook is just one of the many places where things can fall apart. EventLoop disposal would be logically the next place that can fail.
I think it's fair to catch the exception and shut down pause detector. I think we don't need to add additional testing for static methods as that drags typically other issues along.
Bug Report
Current Behavior
Attempting to execute commands during a JVM shutdown will cause a RedisConnectionFailureException / IllegalStateException: Shutdown in progress
Code Path
Stack trace:
Expected behavior/code
Gracefully handle calls to DefaultPauseDetectorWrapper#retain during shutdown.
Environment
Possible Solution
Just shutdown the PauseDetector immediately because it would have been shutdown anyway.
Additional context
Our use case was that we wanted to finish processing after getting SIGTERM and gracefully shutdown.
We solved it by using Spring's
@DependsOn
annotation.Another possible use case is to SET something in Redis at shutdown time.
The text was updated successfully, but these errors were encountered: