spring-projects / spring-projects/spring-session

Add support for flush mode to MongoDB session repositories

Open
#1,994 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: mongo-db type: enhancement
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 FlushMode can be used as a strategy for dealing with race conditions, by writing changes to data store as they happen, vs traditionally on invocation of #save on session repository.

Note that this is an option only for Servlet-based implementations, as org.springframework.session.Session#setAttribute returns void (and not Mono<Void>).

All SessionRepository implementations in Spring Session core modules support this and could be used for inspiration.

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.