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 custom readPreference per transaction in mongodb #3703

Closed
SDemonUA opened this issue Nov 7, 2022 · 0 comments
Closed

Add support for custom readPreference per transaction in mongodb #3703

SDemonUA opened this issue Nov 7, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@SDemonUA
Copy link
Contributor

SDemonUA commented Nov 7, 2022

When using mongodb with replica set and readPrefence often set to "secondary". Thus, a mechanism is needed to set transaction level readPrefence for multi-document transaction which involves reads.

Describe the solution you'd like
.begin and .transactional should accept option for setting readPreference.

Describe alternatives you've considered
If UnitOfWork can detect such transactions - it can set readPreference automatically w/o any manual access to it (not changing .begin and .transaction signatures)

@SDemonUA SDemonUA added the enhancement New feature or request label Nov 7, 2022
@B4nan B4nan closed this as completed in d52c747 Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant