-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: mongo transactions #198
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jakubkoci
reviewed
Jan 11, 2024
jakubkoci
reviewed
Jan 16, 2024
packages/frontend/src/common/components/GenericErrorContents.tsx
Outdated
Show resolved
Hide resolved
niall-shaw
force-pushed
the
feat/mongo-transactions
branch
3 times, most recently
from
January 17, 2024 12:05
86d5891
to
04eab02
Compare
niall-shaw
force-pushed
the
feat/mongo-transactions
branch
from
January 17, 2024 13:09
d2b9a4d
to
c73f10f
Compare
Merged
jakubkoci
approved these changes
Jan 18, 2024
i.e. SMTP error
# Conflicts: # packages/backend/src/email/client-stub.ts # packages/backend/src/server.test.ts
# Conflicts: # packages/backend/src/submission/controller.ts
niall-shaw
force-pushed
the
feat/mongo-transactions
branch
from
January 26, 2024 08:05
c73f10f
to
5f60226
Compare
jakubkoci
approved these changes
Jan 26, 2024
jakubkoci
approved these changes
Jan 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves the same problem as #197, but by using transactions instead of manual deletions / updates.
This has the added benefit of not exposing any unnecessary
delete
functions, but requires some extra overhead of creating and passing a mongosession
.Sessions and transactions require mongodb replica sets, which is why there were several changes required to be made to the docker-compose.
I believe this is the better/correct approach, as production uses replica sets anyway.
Unfortunately, it isn't possible to start the default github actions' mongodb service with replica sets, hence the use of the third party action.
Working with docker-compose, tilt, local development (i.e.
yarn dev
) and CI.Note: For local development, or environments using single node replica sets, you must include
?directConnection=true
as part of your connection string.