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

Allow Customization of Expiration Policy in RedisIndexedHttpSession #2906

Closed
marcusdacoregio opened this issue Mar 28, 2024 · 1 comment · Fixed by #3122
Closed

Allow Customization of Expiration Policy in RedisIndexedHttpSession #2906

marcusdacoregio opened this issue Mar 28, 2024 · 1 comment · Fixed by #3122
Assignees
Labels
in: redis status: duplicate A duplicate of another issue type: enhancement A general enhancement
Milestone

Comments

@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Mar 28, 2024

Similar to https://docs.spring.io/spring-session/reference/3.3/configuration/reactive-redis-indexed.html#how-spring-session-cleans-up-expired-sessions

Currently, if the server is down for some time, the sessions might not be visited to force its expiration.
That happens because the key that holds the information about when the sessions will expire is based on the expected expiration minute, however, if the server is down during the time of that key, some of them might be skipped, resulting in memory usage overhead.

@marcusdacoregio
Copy link
Contributor Author

marcusdacoregio commented May 13, 2024

That problem also happens when using a clustered Redis: since Spring Data Redis only subscribes to events from a single node, events emitted by other nodes are not received, therefore some indexed sessions are not cleaned up.

@marcusdacoregio marcusdacoregio added this to the 3.4.0-M1 milestone Jun 3, 2024
@marcusdacoregio marcusdacoregio modified the milestones: 3.4.0-M1, 3.4.0-M2 Jul 16, 2024
@marcusdacoregio marcusdacoregio changed the title Consider Sorted Set Expiration Policy in RedisIndexedHttpSession Allow Customization of Expiration Policy in RedisIndexedHttpSession Aug 5, 2024
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 5, 2024
With this commit it is not possible to customize the expiration policy in RedisIndexedHttpSession

Issue spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 6, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Issue spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 6, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Issue spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 7, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Issue spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 7, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Closes spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 7, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Closes spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 9, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Closes spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 9, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Closes spring-projectsgh-2906
marcusdacoregio added a commit to marcusdacoregio/spring-session that referenced this issue Aug 12, 2024
With this commit it is now possible to customize the expiration policy in RedisIndexedHttpSession

Closes spring-projectsgh-2906
@marcusdacoregio marcusdacoregio added the status: duplicate A duplicate of another issue label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: redis status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant