-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Memory leak in Index for principal null
in Redis
#1987
Labels
in: redis
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Comments
This was referenced Dec 28, 2021
Thanks for reaching out @ruslanys. I will be taking a closer look at this in the next few days. |
eleftherias
pushed a commit
that referenced
this issue
Jan 19, 2022
eleftherias
pushed a commit
that referenced
this issue
Jan 20, 2022
eleftherias
pushed a commit
that referenced
this issue
Jan 20, 2022
null
null
in Redis
This was referenced Jan 20, 2022
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
in: redis
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Describe the bug
When a user lands at
/admin
, Spring generates an anonymous session for such user and redirects him to the login page.When a user passes authentication process,
RedisIndexedSessionRepository
persists the session identifier in two indexes:session:index:org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME:null
session:index:org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME:principalUsername
The issue is that
session:index:org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME:null
never cleanup: I see hundreds of identifiers under that index.To Reproduce
user
/password
credentials.spring:session:index:org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME:null
that will never cleanup.Expected behavior
Do not persist session under
null
principal, or clean the identifier when the session changes its principal.Sample
The issue can be reproduced using the sample you have in the repository: https://github.com/spring-projects/spring-session/tree/main/spring-session-samples/spring-session-sample-boot-redis.
The text was updated successfully, but these errors were encountered: