spring-projects / spring-projects/spring-session
Redis session attributes not thread safe
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
the following methods
org.springframework.session.data.redis.ReactiveRedisSessionRepository.createSession()
org.springframework.session.data.redis.RedisSessionMapper.apply(String sessionId, Map<String, Object> map)
create a new "org.springframework.session.MapSession" backed by ReactiveRedisSessionRepository.RedisSession, so getAttributes() return an hashmap; it should be a concurrent hashmap since reactor methods could be executed in different threads
also "ReactiveRedisSessionRepository.RedisSession.delta" should be thread safe
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ReactiveRedisSessionRepository.createSession() and RedisSessionMapper.apply(String sessionId, Map<String, Object> map), then inspect ReactiveRedisSessionRepository.RedisSession.delta and the MapSession attributes they create. Confirm the session attributes and delta remain safe when Reactor work runs on different threads, and validate the behavior with the relevant Spring Session tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100