spring-projects / spring-projects/spring-session

Spring Session Redis should use `Lifecycle` instead of `DisposableBean`

Open
#3,435 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: redis status: ideal-for-contribution type: bug
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

Using DisposableBean is causing conflicts with Spring Data Redis's Connection factories that have migrated to Lifecycle to start/stop connection pools for snapshotting. Lifecycle.stop is invoked too early for Spring Session. Here are a few related tickets:

https://github.com/spring-projects/spring-data-redis/issues/3076
https://github.com/spring-projects/spring-data-redis/issues/2983

We should look into migrating InitializingBean as well.

cc @mp911de

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests, so first locate Spring Session Redis's bean lifecycle implementation and related lifecycle tests. Read the linked Spring Data Redis tickets to understand the ordering conflict; done means resolving the DisposableBean/Lifecycle interaction and determining whether InitializingBean also needs migration, with startup and shutdown behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, redis, spring
Domain
backend, databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.