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

deadlock of Login #589

Open
daiagou opened this issue Jun 1, 2023 · 0 comments
Open

deadlock of Login #589

daiagou opened this issue Jun 1, 2023 · 0 comments

Comments

@daiagou
Copy link

daiagou commented Jun 1, 2023

If a user logs out of the login, then in the "user_account" table, their "has_logged_out" will be Y, and calling the "popstore.CustomerServices.postLogin#Customer" method will cause a deadlock.

We have found the reason. Because logging in will generate an apiKey (insert into user_login_key), which is generated by a new transaction, and at this time, it is also necessary to update the "has_logged_out" (update user_account by another transaction) in the "user_account" table,
The 'user_id' foreign key in the 'user_login_key' table is associated with the 'user_id' in the 'user_account' table. So it will trigger a deadlock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant