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

Add support for Client Sessions [DATAMONGO-1880] #2782

Closed
spring-projects-issues opened this issue Feb 16, 2018 · 4 comments
Closed

Add support for Client Sessions [DATAMONGO-1880] #2782

spring-projects-issues opened this issue Feb 16, 2018 · 4 comments

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Feb 16, 2018

Christoph Strobl opened DATAMONGO-1880 and commented

Support for client/server sessions has been introduced in MongoDB 3.6.
Those sessions will be part of the building blocks used for MongoDB transactions in future releases.

See following for details:


Reference URL: https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/#client-sessions

Referenced from: pull request #536

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 19, 2018

Nathaniel Mishkin commented

Christoph Strobl: While looking into Spring Data MongoDB's support for MongoDB's new client session capabilities, I found this Jira issue via an associated commit and DATAMONGO-1920 which includes this comment:

 ClientSession support applies only to MongoOperations and ReactiveMongoOperations and is not yet available via repositories.

Can you share any info on plans/progress to adding support for client sessions in the context of repository usage? Is there a Jira issue that tracks that work? And/or is this an area that could be plausibly done by an outside contributor (e.g., me)?

Thanks.

 

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 20, 2018

Christoph Strobl commented

Nathaniel Mishkin implementing the ClientSession feature had a limited scope. We did not add any new annotations like @MongoSession or the such to allow declarative session support for repositories. Instead we decided to postpone this till we get to the full transaction support (see: DATAMONGO-1920) so we'd be able to have a MongoDB specific TransactionManager implementation that allows usage of @Transactional annotations that work on a broader scope.

If you have a use case that requires to have just a session, without any transaction ever to be started, please let us know and open a new issue for that

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 20, 2018

Nathaniel Mishkin commented

Christoph Strobl: I'm not very familiar with Spring's transaction support but I'll look into it some more to see if we can use it as a way to meet our goals. My concern is that it'd be overkill for us though. Basically, we just want to be able to use MongoDB 3.6+'s causal consistency feature in our server application that defines many @Repository interfaces. That feature is available only in the context of ClientSessions

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 20, 2018

Christoph Strobl commented

I see - I've added DATAMONGO-2093 for further discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants