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

Declarative way for setting MongoDB transaction options #1628

Closed
spring-projects-issues opened this issue Jun 17, 2013 · 1 comment
Closed
Assignees
Labels
in: core Issues in core support status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Björn Voß opened DATAMONGO-697 and commented

Hi,

I would like to discuss a feature, maybe called "declarative MongoTx", which I need much more than the possibility of calculating a WriteConcern based on a MongoAction, as I think more in usecases greater than on mongo call.

So mongo is eventually consistent and as a user of mongo you know that and are happy with that, but sometimes you might have the need to do some stuff really against the actual data (primary) and as you do critical stuff you want to be 'REPLICA_SAFE' as the other times reading from secondaries is absolute fine as well as the writeConcern NONE.

so what I have done for our project yum-repo-server

@MongoTx(readPreference = "primary", writeConcern = "REPLICAS_SAFE")
public void doMyMissionCriticalStuff() {
...
}

And now I have a similar behavior like @Transactional with spring-data, regarding the isolation level, but NO rollback or so.

What do you think about my idea and do you have similar needs?

regards


Attachments:

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support labels Dec 30, 2020
@christophstrobl
Copy link
Member

related to #4288

@christophstrobl christophstrobl self-assigned this May 17, 2023
@christophstrobl christophstrobl added the status: ideal-for-contribution An issue that a contributor can help us with label Jul 6, 2023
ykardziyaka added a commit to ykardziyaka/spring-data-mongodb that referenced this issue Nov 11, 2023
ykardziyaka added a commit to ykardziyaka/spring-data-mongodb that referenced this issue Nov 14, 2023
@mp911de mp911de changed the title declarative way for setting mongo readprefference/writeconcern [DATAMONGO-697] Declarative way for setting MongoDB transaction options Mar 12, 2024
@mp911de mp911de added this to the 4.3 M2 (2024.0.0) milestone Mar 12, 2024
mp911de pushed a commit that referenced this issue Mar 12, 2024
mp911de added a commit that referenced this issue Mar 12, 2024
Tweak naming. Add Javadoc and documentation.

See #1628
Original pull request: #4552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants