Use dedicated mongo session in quota update method#3057
Merged
ikreymer merged 10 commits intoadditional-minutes-addon-purchasefrom Dec 10, 2025
Merged
Use dedicated mongo session in quota update method#3057ikreymer merged 10 commits intoadditional-minutes-addon-purchasefrom
ikreymer merged 10 commits intoadditional-minutes-addon-purchasefrom
Conversation
12992e3 to
6f2c805
Compare
This was referenced Dec 9, 2025
261f9b8 to
43bb583
Compare
6f2c805 to
702100c
Compare
ikreymer
reviewed
Dec 9, 2025
ikreymer
approved these changes
Dec 10, 2025
Member
ikreymer
left a comment
There was a problem hiding this comment.
Looks good and makes sense.
(Remove extra nightly test that was probably readded during merge - that functionality is now being tested in regular tests)
tw4l
approved these changes
Dec 10, 2025
Member
tw4l
left a comment
There was a problem hiding this comment.
Also tested locally and looking good. Thanks!
This file contains hidden or 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
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.
To be merged into #2944
Adds a causally consistent session specifically to the quota update method so that its three operations can operate more-or-less atomically.
We'd looked at doing this with a transaction, but they require a replica set or sharding, which isn't always included in self-hosted Browsertrix deployments. For now this should improve reliability for the multi-operation
update_quotasmethod, even if it's not perfectly atomic — it's pretty unlikely at the scale we're working with here for there to be multiple simultaneous operations for a single org.Tested with local deployment.