-
Notifications
You must be signed in to change notification settings - Fork 632
fix: Isolation level and reservation table #1201
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
base: master
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,25 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these being added now?
| con.setRequestMethod(method); | ||
| con.setConnectTimeout(connectionTimeoutMS); | ||
| con.setReadTimeout(readTimeoutMS + 1000); | ||
| con.setReadTimeout(readTimeoutMS * 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing. (both the original + 1k and the current *3)
| synchronized (syncObject) { | ||
| t1State.set("read"); | ||
| syncObject.notifyAll(); | ||
| } | ||
| Runnable r1 = () -> { | ||
| try { | ||
| sqlStorage.startTransaction(con -> { | ||
| tryCount1.incrementAndGet(); | ||
|
|
||
| synchronized (syncObject) { | ||
| while (!t2State.get().equals("read")) { | ||
| try { | ||
| syncObject.wait(); | ||
| } catch (InterruptedException e) { | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
| tenantIds.addAll(primaryUser.tenantIds); | ||
|
|
||
| checkIfLoginMethodCanBeLinkedOnTenant(con, appIdentifier, authRecipeStorage, tenantIds, recipeUser.loginMethods[0], primaryUser); | ||
| Set<String> emails = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a for update lock on both the primary and recipe user at this point, right?
| Set<LoginMethod.ThirdParty> thirdParties = new HashSet<>(); | ||
|
|
||
| for (LoginMethod currLoginMethod : primaryUser.loginMethods) { | ||
| checkIfLoginMethodCanBeLinkedOnTenant(con, appIdentifier, authRecipeStorage, tenantIds, currLoginMethod, primaryUser); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the util function we used to use?
Summary of change
(A few sentences about this PR)
Related issues
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your
changes work. Bonus points for screenshots and videos!)
Documentation changes
(If relevant, please create a PR in our docs repo, or create a checklist here
highlighting the necessary changes)
Checklist for important updates
coreDriverInterfaceSupported.jsonfile has been updated (if needed)pluginInterfaceSupported.jsonfile has been updated (if needed)build.gradlegetPaidFeatureStatsfunction in FeatureFlag.java filebuild.gradle, please make sure to add themin
implementationDependencies.json.getValidFieldsinio/supertokens/config/CoreConfig.javaif new aliases were added for any coreconfig (similar to the
access_token_signing_key_update_intervalconfig alias).git tag) in the formatvX.Y.Z, and then find thelatest branch (
git branch --all) whoseX.Yis greater than the latest released tag.app_id_to_user_idtable, make sure to delete from this table when deletingthe user as well if
deleteUserIdMappingToois false.Remaining TODOs for this PR