deadlock of Login
Opened this issue · 0 comments
daiagou commented
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.