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
After migration to spring parent 2.5.0 from 3.4.0, the spring data redis lost data the intermittently.
I isolated one specific scenario that reproduce in my machine.
Enviroment:
I use the default Spring integration
I save the object complex in spring session through below code:
I use the last version of redis (7.4.1)
Scenario
My aplication execute the endpoint /front/adapters/grouper/23866860
After the response of backend, the front call the requests in parallel
/front/constraints/list/disabled
/front/user-requirements/user/forced/dto
/front/tree
/front/user-requirements/recommendation/disabled
/front/tree/nodes/filter/autocomplete
In my secondary user interactive, i call the endpoint /front/drawings-urs[]
My problem:
When, i started the application in every firsty execution, the system lost data session in the parallel requests.
I created one LoggableDispatcherServlet to log session informations, please follow the file: LoggableDispatcherServlet.txt
In log from LoggableDispatcherServlet, please, check the order of request/response. I converted from table the better visualization
I have a similar problem with @EnableRedisWebSession in the reactive implementation. The first request has data but after multiple concurrent calls, the logging is:
2024-12-04T10:30:12.620+01:00 DEBUG 7771 --- [a-gateway] [ctor-http-nio-7] o.s.s.w.s.u.m.OrServerWebExchangeMatcher : matched
2024-12-04T10:30:12.620+01:00 DEBUG 7771 --- [a-gateway] [ctor-http-nio-7] a.DelegatingReactiveAuthorizationManager : Checking authorization on '/api/my-path' using org.springframework.security.authorization.AuthenticatedReactiveAuthorizationManager@7ce32811
2024-12-04T10:30:12.620+01:00 DEBUG 7771 --- [a-gateway] [ parallel-8] ebSessionServerSecurityContextRepository : No SecurityContext found in WebSession: 'org.springframework.session.web.server.session.SpringSessionWebSessionStore$SpringSessionWebSession@59238507'
2024-12-04T10:30:12.621+01:00 DEBUG 7771 --- [a-gateway] [ parallel-1] ebSessionServerSecurityContextRepository : No SecurityContext found in WebSession: 'org.springframework.session.web.server.session.SpringSessionWebSessionStore$SpringSessionWebSession@3bc005b0'
2024-12-04T10:30:12.621+01:00 DEBUG 7771 --- [a-gateway] [ parallel-1] o.s.s.w.s.a.AuthorizationWebFilter : Authorization failed: Access Denied
2024-12-04T10:30:12.621+01:00 DEBUG 7771 --- [a-gateway] [ parallel-8] o.s.s.w.s.a.AuthorizationWebFilter : Authorization failed: Access Denied
2024-12-04T10:30:12.624+01:00 DEBUG 7771 --- [a-gateway] [ parallel-1] ebSessionServerSecurityContextRepository : No SecurityContext found in WebSession: 'org.springframework.session.web.server.session.SpringSessionWebSessionStore$SpringSessionWebSession@3bc005b0'
2024-12-04T10:30:12.624+01:00 DEBUG 7771 --- [a-gateway] [ parallel-8] ebSessionServerSecurityContextRepository : No SecurityContext found in WebSession: 'org.springframework.session.web.server.session.SpringSessionWebSessionStore$SpringSessionWebSession@59238507'
I compared it with Spring boot 3.3.5 and what seems to be different is the thread:
2024-12-04T10:34:21.692+01:00 DEBUG 8084 --- [a-gateway] [ioEventLoop-5-1] ebSessionServerSecurityContextRepository : Found SecurityContext 'SecurityContextImpl [Authentication=OAuth2AuthenticationToken [...]]' in WebSession: 'org.springframework.session.web.server.session.SpringSessionWebSessionStore$SpringSessionWebSession@257c99b3'
After migration to spring parent 2.5.0 from 3.4.0, the spring data redis lost data the intermittently.
I isolated one specific scenario that reproduce in my machine.
Enviroment:
Scenario
My aplication execute the endpoint
/front/adapters/grouper/23866860
After the response of backend, the front call the requests in parallel
In my secondary user interactive, i call the endpoint
/front/drawings-urs[]
My problem:
When, i started the application in every firsty execution, the system lost data session in the parallel requests.
I created one LoggableDispatcherServlet to log session informations, please follow the file:
LoggableDispatcherServlet.txt
In log from LoggableDispatcherServlet, please, check the order of request/response. I converted from table the better visualization
Check:
Please, verify and fix this problem, please. If need more information, please tell me in the response this question.
The text was updated successfully, but these errors were encountered: