-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ReactiveRedisOperationsSessionRepository logout race condition with NullPointerException in findById #1111
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
Comments
Also note that there's a similar problem (though one that does not involve race condition) with the same side effect reported in #1114. |
@vpavic is there some kind of a workaround until this thing is fixed? |
@vpavic Will it be fixed in 2.0.5? My app is actively using WebSockets, so production usage of reactive Redis sessions is impossible for me. |
@vpavic thanks! Unfortunately, nothing changed for me. Probably because Spring Security WebSessionServerSecurityContextRepository calls changeSessionId() on logout rather than invalidate() |
@vpavic Yes, I even placed some breakpoints before invoking logout request: |
Actually, what I have now:
|
3.5. One WebSocket shuts down because the session doesn't exist anymore with old key. |
Thanks for further info @haizz. Any chance you could put this into a sample app that we could use to reproduce the problem? |
Thanks for the sample app @haizz, I think I now have an idea what's going on. The problem is that the WebSocket request is a long running one, and as such There are actually two problematic places here:
For the first part, i.e. The second part of the story ( |
Thanks @vpavic! Will the second part be fixed in 2.0.5? |
Created issue with Spring Framework: https://jira.spring.io/browse/SPR-17051 |
Using Spring Boot 2.0.3 with reactive WebFlux and spring-session-data-redis 2.0.4.
EDIT: Created related Spring Framework issue: https://jira.spring.io/browse/SPR-17051
The text was updated successfully, but these errors were encountered: