-
Notifications
You must be signed in to change notification settings - Fork 86
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
Feature/multi book commit #113
Conversation
New helper function `commit` to handle the simultaneous transaction commit for multiple entries
This reverts commit 80b026e.
…onality"" This reverts commit b220fd2.
This commit introduces a new function commit designed to handle the transactional commit of multiple entries within a MongoDB session. Using the mongoTransaction utility, it ensures atomicity and data integrity during the commit process.
Could you please provide your expert opinion, @koresar, regarding the new function and share your thoughts? I want to note that the new function requires the creation of corresponding unit tests. However, before proceeding, I would still like to receive feedback regarding the changes. |
I would avoid involving sessions for the single collection document insertions. |
…allow committing empty entries. This function commits a list of entries to the database using a MongoDB (mongoTransaction helper function) transaction if there are multiple entries provided. It ensures atomicity for multiple commits. However, it does not use a transaction for single commits and prohibits committing empty entries.
Dear @koresar, Could you please review it again? Thank you. |
We need to talk. :) |
This PR introduces a new helper function
commit
designed to handle the transactional commit of multipleentries
within a MongoDB session. Using themongoTransaction
helper, ensures atomicity and data integrity during the commit process.Expected syntax to use: