spring-projects / spring-projects/spring-session
Add support for flush mode to MongoDB session repositories
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Since MongoDB support has been migrated back to this repository, I'm cloning the issue originally reported in spring-projects/spring-session-data-mongodb#107.
Original issue description:
Immediate
FlushModecan be used as a strategy for dealing with race conditions, by writing changes to data store as they happen, vs traditionally on invocation of#saveon session repository.Note that this is an option only for Servlet-based implementations, as
org.springframework.session.Session#setAttributereturnsvoid(and notMono<Void>).All
SessionRepositoryimplementations in Spring Session core modules support this and could be used for inspiration.
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 spring-session-core/src/main/java/org/springframework/session/FlushMode.java and inspect the existing SessionRepository implementations in the Spring Session core modules for how flush modes are handled. Then trace the MongoDB session repository entry points and verify that the Servlet-based repositories support immediate flushing while preserving the existing save behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mongodb, spring
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100